[coreboot-gerrit] New patch to review for coreboot: dde10a9 PDCurses: pdcscrn.c: Use `#ifdef` instead of `#if CONFIG_SPEAKER`

Paul Menzel (paulepanter@users.sourceforge.net) gerrit at coreboot.org
Thu Mar 28 11:48:33 CET 2013

Paul Menzel (paulepanter at users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2934


commit dde10a98b559239dba9c6fc4f176dab3d01c7abe
Author: Paul Menzel <paulepanter at users.sourceforge.net>
Date:   Wed Mar 27 09:50:30 2013 +0100

    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 writes [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’.
    so use `#ifdef` [2] to silence this warning. No functional change is
    done, as `CONFIG_SPEAKER` is assigned the value `Y` when defined.
    [1] http://gcc.gnu.org/onlinedocs/cpp/If.html
    [2] http://gcc.gnu.org/onlinedocs/cpp/Ifdef.html
    Change-Id: I8e9c9b5d01985b21ad05018986d614cf9bf2b439
    Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
 payloads/libpayload/curses/pdcurses-backend/pdcscrn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/payloads/libpayload/curses/pdcurses-backend/pdcscrn.c b/payloads/libpayload/curses/pdcurses-backend/pdcscrn.c
index d3f1849..e741b15 100644
--- a/payloads/libpayload/curses/pdcurses-backend/pdcscrn.c
+++ b/payloads/libpayload/curses/pdcurses-backend/pdcscrn.c
@@ -72,7 +72,7 @@ int PDC_scr_open(int argc, char **argv)
     SP->lines = PDC_get_rows();
     SP->cols = PDC_get_columns();
     SP->audible = TRUE;

More information about the coreboot-gerrit mailing list