Hello Mart!
On Sun, 22 Feb 2009, Mart Raudsepp wrote:
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
The variable c is also used in the serial console input code just below the PS/2 one, so to trigger the error all of CONFIG_USB_HID, CONFIG_PC_KEYBOARD, and CONFIG_SERIAL_CONSOLE needs to be undefined. I guess we won't get much input to libpayload then. The patch in current form will instead throw an error if CONFIG_SERIAL_CONSOLE is defined while CONFIG_USB_HID and CONFIG_PC_KEYBOARD are not, i.e. for those who build only for serial console.
I propose to include "|| defined(CONFIG_SERIAL_CONSOLE)" in the #if.
With that change included the patch is
Acked-by: Ulf Jordan jordan@chalmers.se
/ulf