diff options
author | Stefan Reinauer <reinauer@chromium.org> | 2013-03-25 15:30:30 -0700 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2013-03-26 19:13:29 +0100 |
commit | 8d225f141d45e3eba5bb39973e4889e884d9a64f (patch) | |
tree | aa7d698ad89b21817aec05de146b8be371d447e2 /payloads/libpayload/curses | |
parent | 0fef4fe61ba4a6775fa8ab671212bf0acc9a8adf (diff) |
libpayload: Fix variable shadowing in PDCurses
PDCurses has a function called overlay() and also uses
overlay as a variable name in some functions.
This patch fixes the ambiguity that caused warnings like
curses/PDCurses-3.4/pdcurses/overlay.c: In function '_copy_win':
curses/PDCurses-3.4/pdcurses/overlay.c:51:39: warning: declaration of 'overlay' shadows a global declaration [-Wshadow]
In file included from curses/PDCurses-3.4/curspriv.h:16:0,
from curses/PDCurses-3.4/pdcurses/overlay.c:3:
curses/PDCurses-3.4/curses.h:1014:9: warning: shadowed declaration is here [-Wshadow]
Change-Id: I907653df0c8bb32c98bdcbc6476e94d2da6e0e90
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/2906
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'payloads/libpayload/curses')
-rw-r--r-- | payloads/libpayload/curses/PDCurses-3.4/pdcurses/overlay.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/payloads/libpayload/curses/PDCurses-3.4/pdcurses/overlay.c b/payloads/libpayload/curses/PDCurses-3.4/pdcurses/overlay.c index a1d5791450..d1e9f21719 100644 --- a/payloads/libpayload/curses/PDCurses-3.4/pdcurses/overlay.c +++ b/payloads/libpayload/curses/PDCurses-3.4/pdcurses/overlay.c @@ -48,7 +48,7 @@ RCSID("$Id: overlay.c,v 1.36 2008/07/14 12:35:23 wmcbrine Exp $") static int _copy_win(const WINDOW *src_w, WINDOW *dst_w, int src_tr, int src_tc, int src_br, int src_bc, int dst_tr, - int dst_tc, bool overlay) + int dst_tc, bool _overlay) { int col, line, y1, fc, *minchng, *maxchng; chtype *w1ptr, *w2ptr; @@ -79,7 +79,7 @@ static int _copy_win(const WINDOW *src_w, WINDOW *dst_w, int src_tr, for (col = 0; col < xdiff; col++) { if ((*w1ptr) != (*w2ptr) && - !((*w1ptr & A_CHARTEXT) == ' ' && overlay)) + !((*w1ptr & A_CHARTEXT) == ' ' && _overlay)) { *w2ptr = *w1ptr; @@ -228,7 +228,7 @@ int overwrite(const WINDOW *src_w, WINDOW *dst_w) } int copywin(const WINDOW *src_w, WINDOW *dst_w, int src_tr, int src_tc, - int dst_tr, int dst_tc, int dst_br, int dst_bc, int overlay) + int dst_tr, int dst_tc, int dst_br, int dst_bc, int _overlay) { int src_end_x, src_end_y; int src_rows, src_cols, dst_rows, dst_cols; @@ -252,5 +252,5 @@ int copywin(const WINDOW *src_w, WINDOW *dst_w, int src_tr, int src_tc, src_end_x = src_tc + min_cols; return _copy_win(src_w, dst_w, src_tr, src_tc, src_end_y, src_end_x, - dst_tr, dst_tc, overlay); + dst_tr, dst_tc, _overlay); } |