coreboot-kgpe-d16/payloads/libpayload/curses
Paul Menzel bab0a0b577 PDCurses: pdcscrn.c: Use `#ifdef` instead of `#if CONFIG_SPEAKER`
Building libpayload with the PDCurses backend the following warning
is shown.

    /src/coreboot/payloads/libpayload(master) $ make clean
    /src/coreboot/payloads/libpayload(master) $ make
    […]
        CC         curses/pdcurses-backend/pdcscrn.libcurses.o
    curses/pdcurses-backend/pdcscrn.c: In function 'PDC_scr_open':
    curses/pdcurses-backend/pdcscrn.c:75:5: warning: "CONFIG_SPEAKER" is not defined [-Wundef]
    […]

The GCC documentation states [1]

    In some contexts this shortcut is undesirable. The -Wundef option
    causes GCC to warn whenever it encounters an identifier which is
    not a macro in an ‘#if’.

and therefore use `#ifdef` [2] to silence this warning. No functional
change is done, as `CONFIG_SPEAKER` is assigned the value `Y` when
defined.

There was some discussion going on the list [3], but my points in there
turned out to be incorrect.

[1] http://gcc.gnu.org/onlinedocs/cpp/If.html
[2] http://gcc.gnu.org/onlinedocs/cpp/Ifdef.html
[3] http://www.coreboot.org/pipermail/coreboot/2013-March/075561.html

Change-Id: I8e9c9b5d01985b21ad05018986d614cf9bf2b439
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: http://review.coreboot.org/2934
Reviewed-by: Nico Huber <nico.huber@secunet.com>
Tested-by: build bot (Jenkins)
2013-04-01 23:24:38 +02:00
..
PDCurses-3.4 libpayload: Fix prototype warnings in PDCurses 2013-03-26 19:37:33 +01:00
form libpayload: remove trailing whitespace and run dos2unix 2011-11-01 19:08:23 +01:00
menu libpayload: remove trailing whitespace and run dos2unix 2011-11-01 19:08:23 +01:00
pdcurses-backend PDCurses: pdcscrn.c: Use `#ifdef` instead of `#if CONFIG_SPEAKER` 2013-04-01 23:24:38 +02:00
Makefile.inc libpayload: Add PDCurses and ncurses' libform/libmenu 2011-08-04 08:10:41 +02:00
colors.c
curses.h libpayload: Add PDCurses and ncurses' libform/libmenu 2011-08-04 08:10:41 +02:00
curses.priv.h libpayload: Add PDCurses and ncurses' libform/libmenu 2011-08-04 08:10:41 +02:00
keyboard.c Reduce warnings/errors in libpayload when using picky compiler options 2011-06-30 20:41:23 +02:00
local.h
tinycurses.c libpayload: Don't declare mouse support in tinycurses 2011-07-07 22:30:05 +02:00