From 0a527e7e5d3be94add22b654b74defd259f0ea76 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Mon, 25 Mar 2013 15:38:21 -0700 Subject: libpayload: Fix prototype warnings in PDCurses This fixes the following PDCurses warnings: CC curses/pdcurses-backend/pdcsetsc.libcurses.o curses/pdcurses-backend/pdcsetsc.c: In function 'PDC_curs_set': curses/pdcurses-backend/pdcsetsc.c:17:9: warning: implicit declaration of function 'serial_cursor_enable' [-Wimplicit-function-declaration] curses/pdcurses-backend/pdcsetsc.c:22:9: warning: implicit declaration of function 'video_console_cursor_enable' [-Wimplicit-function-declaration] CC curses/pdcurses-backend/pdcutil.libcurses.o curses/pdcurses-backend/pdcutil.c:30:6: warning: no previous prototype for 'curses_enable_serial' [-Wmissing-prototypes] curses/pdcurses-backend/pdcutil.c:35:6: warning: no previous prototype for 'curses_enable_vga' [-Wmissing-prototypes] curses/pdcurses-backend/pdcutil.c:40:5: warning: function declaration isn't a prototype [-Wstrict-prototypes] curses/pdcurses-backend/pdcutil.c:45:5: warning: function declaration isn't a prototype [-Wstrict-prototypes] Change-Id: If0d4d475d3006f1a77f67ec46c6bdf4ee2906981 Signed-off-by: Stefan Reinauer Reviewed-on: http://review.coreboot.org/2908 Reviewed-by: Dave Frodin Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- payloads/libpayload/curses/PDCurses-3.4/curses.h | 8 ++++++++ payloads/libpayload/curses/pdcurses-backend/pdcsetsc.c | 1 + payloads/libpayload/curses/pdcurses-backend/pdcutil.c | 5 +++-- 3 files changed, 12 insertions(+), 2 deletions(-) (limited to 'payloads') diff --git a/payloads/libpayload/curses/PDCurses-3.4/curses.h b/payloads/libpayload/curses/PDCurses-3.4/curses.h index 40585d3ab2..5f651fef44 100644 --- a/payloads/libpayload/curses/PDCurses-3.4/curses.h +++ b/payloads/libpayload/curses/PDCurses-3.4/curses.h @@ -1374,4 +1374,12 @@ int sb_refresh(void); } #endif +/* Local functions not defined in normal curses */ + +void curses_enable_vga(int); +void curses_enable_serial(int); + +int curses_vga_enabled(void); +int curses_serial_enabled(void); + #endif /* __PDCURSES__ */ diff --git a/payloads/libpayload/curses/pdcurses-backend/pdcsetsc.c b/payloads/libpayload/curses/pdcurses-backend/pdcsetsc.c index f0e83cf3cf..d016063ff0 100644 --- a/payloads/libpayload/curses/pdcurses-backend/pdcsetsc.c +++ b/payloads/libpayload/curses/pdcurses-backend/pdcsetsc.c @@ -1,6 +1,7 @@ /* Public Domain Curses */ /* This file is BSD licensed, Copyright 2011 secunet AG */ +#include #include "lppdc.h" int PDC_curs_set(int visibility) diff --git a/payloads/libpayload/curses/pdcurses-backend/pdcutil.c b/payloads/libpayload/curses/pdcurses-backend/pdcutil.c index 8fb3e161d7..030f4622e2 100644 --- a/payloads/libpayload/curses/pdcurses-backend/pdcutil.c +++ b/payloads/libpayload/curses/pdcurses-backend/pdcutil.c @@ -2,6 +2,7 @@ /* This file is BSD licensed, Copyright 2011 secunet AG */ #include "lppdc.h" +#include #include int curses_flags = F_ENABLE_SERIAL | F_ENABLE_CONSOLE; @@ -37,12 +38,12 @@ void curses_enable_vga(int enable) curses_flags = (curses_flags & ~F_ENABLE_CONSOLE) | (enable * F_ENABLE_CONSOLE); } -int curses_serial_enabled() +int curses_serial_enabled(void) { return !!(curses_flags & F_ENABLE_SERIAL); } -int curses_vga_enabled() +int curses_vga_enabled(void) { return !!(curses_flags & F_ENABLE_CONSOLE); } -- cgit v1.2.3