Stefan Reinauer (stefan.reinauer@coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2905
-gerrit
commit 998a80d9bfe341957d6db1fdc4f6c6ed59e7dfb6 Author: Stefan Reinauer reinauer@chromium.org Date: Mon Mar 25 15:15:16 2013 -0700
libpayload: Fix const warnings in keyname() and termname()
The keyname() and termname() functions were creating a whole lot of warnings of the style
curses/PDCurses-3.4/pdcurses/keyname.c:41:9: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
This patch fixes them.
Change-Id: Iae3c4e5201b48c2d2033cac48577e0462a34f309 Signed-off-by: Stefan Reinauer reinauer@google.com --- payloads/libpayload/curses/PDCurses-3.4/curses.h | 4 ++-- payloads/libpayload/curses/PDCurses-3.4/pdcurses/keyname.c | 4 ++-- payloads/libpayload/curses/PDCurses-3.4/pdcurses/termattr.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/payloads/libpayload/curses/PDCurses-3.4/curses.h b/payloads/libpayload/curses/PDCurses-3.4/curses.h index 88942c0..40585d3 100644 --- a/payloads/libpayload/curses/PDCurses-3.4/curses.h +++ b/payloads/libpayload/curses/PDCurses-3.4/curses.h @@ -945,7 +945,7 @@ int intrflush(WINDOW *, bool); bool isendwin(void); bool is_linetouched(WINDOW *, int); bool is_wintouched(WINDOW *); -char *keyname(int); +const char *keyname(int); int keypad(WINDOW *, bool); char killchar(void); int leaveok(WINDOW *, bool); @@ -1061,7 +1061,7 @@ WINDOW *subwin(WINDOW *, int, int, int, int); int syncok(WINDOW *, bool); chtype termattrs(void); attr_t term_attrs(void); -char *termname(void); +const char *termname(void); void timeout(int); int touchline(WINDOW *, int, int); int touchwin(WINDOW *); diff --git a/payloads/libpayload/curses/PDCurses-3.4/pdcurses/keyname.c b/payloads/libpayload/curses/PDCurses-3.4/pdcurses/keyname.c index 4d300ff..5bfeb6e 100644 --- a/payloads/libpayload/curses/PDCurses-3.4/pdcurses/keyname.c +++ b/payloads/libpayload/curses/PDCurses-3.4/pdcurses/keyname.c @@ -32,11 +32,11 @@ RCSID("$Id: keyname.c,v 1.8 2008/07/13 16:08:18 wmcbrine Exp $")
**man-end****************************************************************/
-char *keyname(int key) +const char *keyname(int key) { /* Key names must be in exactly the same order as in curses.h */
- static char *key_name[] = + static const char *key_name[] = { "KEY_BREAK", "KEY_DOWN", "KEY_UP", "KEY_LEFT", "KEY_RIGHT", "KEY_HOME", "KEY_BACKSPACE", "KEY_F0", "KEY_F(1)", "KEY_F(2)", diff --git a/payloads/libpayload/curses/PDCurses-3.4/pdcurses/termattr.c b/payloads/libpayload/curses/PDCurses-3.4/pdcurses/termattr.c index f25ee95..7e49047 100644 --- a/payloads/libpayload/curses/PDCurses-3.4/pdcurses/termattr.c +++ b/payloads/libpayload/curses/PDCurses-3.4/pdcurses/termattr.c @@ -135,7 +135,7 @@ attr_t term_attrs(void) WA_RIGHT | WA_UNDERLINE; }
-char *termname(void) +const char *termname(void) { PDC_LOG(("termname() - called\n"));