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>
This commit is contained in:
Stefan Reinauer 2013-03-25 15:30:30 -07:00 committed by Stefan Reinauer
parent 0fef4fe61b
commit 8d225f141d
1 changed files with 4 additions and 4 deletions

View File

@ -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);
}