summaryrefslogtreecommitdiffstats
path: root/payloads
diff options
context:
space:
mode:
authorMart Raudsepp <leio@gentoo.org>2009-02-22 23:13:33 +0000
committerMart Raudsepp <mart.raudsepp@artecdesign.ee>2009-02-22 23:13:33 +0000
commitc5a2ec6f96a10b9dcc110fc63d78b1a46dde4ea3 (patch)
tree249dcbcbc9e2282375646e083f15f464957f24af /payloads
parentbc8744e1bfe25d8ddf291ca6082eb45fa208e270 (diff)
downloadcoreboot-staging-c5a2ec6f96a10b9dcc110fc63d78b1a46dde4ea3.zip
coreboot-staging-c5a2ec6f96a10b9dcc110fc63d78b1a46dde4ea3.tar.gz
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@gentoo.org> Acked-by: Ulf Jordan <jordan@chalmers.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3957 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads')
-rw-r--r--payloads/libpayload/curses/keyboard.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/payloads/libpayload/curses/keyboard.c b/payloads/libpayload/curses/keyboard.c
index 4a96428..4370b28 100644
--- a/payloads/libpayload/curses/keyboard.c
+++ b/payloads/libpayload/curses/keyboard.c
@@ -146,7 +146,9 @@ static int cook_serial(unsigned char ch)
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
OpenPOWER on IntegriCloud