[coreboot] r3957 - trunk/payloads/libpayload/curses

svn at coreboot.org svn at coreboot.org
Mon Feb 23 00:13:34 CET 2009


Author: mraudsepp
Date: 2009-02-23 00:13:33 +0100 (Mon, 23 Feb 2009)
New Revision: 3957

Modified:
   trunk/payloads/libpayload/curses/keyboard.c
Log:
libpayload: Fix build when both USB and PS/2 keyboard support is disabled

libpayload uses -Werror for some reason right now, and the
variable 'c' in curses_getchar is only used if CONFIG_USB_HID
or CONFIG_PC_KEYBOARD is defined, giving an unused variable
warning that gets promoted to an error.
So wrap the variable declaration around appropriate #ifdef's

Signed-off-by: Mart Raudsepp <leio at gentoo.org>
Acked-by: Ulf Jordan <jordan at chalmers.se>

Modified: trunk/payloads/libpayload/curses/keyboard.c
===================================================================
--- trunk/payloads/libpayload/curses/keyboard.c	2009-02-22 21:07:28 UTC (rev 3956)
+++ trunk/payloads/libpayload/curses/keyboard.c	2009-02-22 23:13:33 UTC (rev 3957)
@@ -146,7 +146,9 @@
 
 static int curses_getchar(int delay)
 {
+#if defined(CONFIG_USB_HID) || defined(CONFIG_PC_KEYBOARD) || defined(CONFIG_SERIAL_CONSOLE)
 	unsigned short c;
+#endif
 
 	do {
 #ifdef CONFIG_USB_HID





More information about the coreboot mailing list