diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2008-03-20 20:46:44 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2008-03-20 20:46:44 +0000 |
commit | 14a3feb0686b9c97034de828844f52c75ccc42d1 (patch) | |
tree | a3e4a54ab6796cc60b045a8f03bf23ff5a000d7e /payloads/libpayload/curses | |
parent | 35845a2acb869ea028c98c8c2b912ae3c61053e2 (diff) |
Fix code to allow usage of -Wall in libpayload and the sample (trivial).
This even fixes two bugs:
- get_cpu_speed() didn't return a value.
- The line
win->_color - PAIR_NUMBER(0);
should actually be
win->_color = PAIR_NUMBER(0);
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3182 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/libpayload/curses')
-rw-r--r-- | payloads/libpayload/curses/colors.c | 2 | ||||
-rw-r--r-- | payloads/libpayload/curses/keyboard.c | 1 | ||||
-rw-r--r-- | payloads/libpayload/curses/tinycurses.c | 7 |
3 files changed, 7 insertions, 3 deletions
diff --git a/payloads/libpayload/curses/colors.c b/payloads/libpayload/curses/colors.c index 34091498c0..5065f5c825 100644 --- a/payloads/libpayload/curses/colors.c +++ b/payloads/libpayload/curses/colors.c @@ -57,4 +57,6 @@ int pair_content(short index, short *fg, short *bg) *bg = (color_pairs[index] >> 4) & 0xF; *fg = color_pairs[index] & 0xF; + + return 0; } diff --git a/payloads/libpayload/curses/keyboard.c b/payloads/libpayload/curses/keyboard.c index 3ec4d9d7bf..2062ac2ffe 100644 --- a/payloads/libpayload/curses/keyboard.c +++ b/payloads/libpayload/curses/keyboard.c @@ -268,6 +268,7 @@ int wgetch(WINDOW *win) int nodelay(WINDOW *win, NCURSES_BOOL flag) { win->_delay = flag ? 0 : -1; + return 0; } #ifdef CONFIG_VGA_CONSOLE diff --git a/payloads/libpayload/curses/tinycurses.c b/payloads/libpayload/curses/tinycurses.c index 946cdeb18b..f9c0798d05 100644 --- a/payloads/libpayload/curses/tinycurses.c +++ b/payloads/libpayload/curses/tinycurses.c @@ -145,7 +145,7 @@ int delwin(WINDOW *win) } WINDOW *derwin(WINDOW *orig, int num_lines, int num_columns, int begy, int begx) { - WINDOW *win; + WINDOW *win = NULL; int i; int flags = _SUBWIN; @@ -167,6 +167,7 @@ WINDOW *derwin(WINDOW *orig, int num_lines, int num_columns, int begy, int begx) if (orig->_flags & _ISPAD) flags |= _ISPAD; + // FIXME //// if ((win = _nc_makenew(num_lines, num_columns, orig->_begy + begy, //// orig->_begx + begx, flags)) == 0) //// return NULL; @@ -308,8 +309,8 @@ WINDOW *newwin(int num_lines, int num_columns, int begy, int begx) win->_line = &ldat_list[ldat_count++]; - /* FIXME: Is this right? Should the window attributes be normal? */ - win->_color - PAIR_NUMBER(0); + /* FIXME: Is this right? Should the window attributes be normal? */ + win->_color = PAIR_NUMBER(0); win->_attrs = A_NORMAL; for (i = 0; i < num_lines; i++) |