From 7ee26cbf025d915c6c15e2fe877ee92846f5992f Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Wed, 31 Dec 2014 23:01:21 +0000 Subject: maint: fix shadow declaration This change fixes all shadow declarations. The worth while to mention fix is with libfdisk sun geometry. It comes from bitops.h cpu_to_be16 macro that further expands from include/bits/byteswap.h that has the shadowing. libfdisk/src/sun.c:961:173: warning: declaration of '__v' shadows a previous local [-Wshadow] libfdisk/src/sun.c:961:69: warning: shadowed declaration is here [-Wshadow] libfdisk/src/sun.c:961:178: warning: declaration of '__x' shadows a previous local [-Wshadow] libfdisk/src/sun.c:961:74: warning: shadowed declaration is here [-Wshadow] That could have caused earlier some unexpected results. Signed-off-by: Sami Kerola --- disk-utils/cfdisk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'disk-utils/cfdisk.c') diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c index 60a953524..1d4e2d579 100644 --- a/disk-utils/cfdisk.c +++ b/disk-utils/cfdisk.c @@ -505,7 +505,7 @@ static int ask_menu(struct fdisk_ask *ask, struct cfdisk *cf) /* wait for keys */ do { - int key = getch(); + key = getch(); if (ui_resize) ui_menu_resize(cf); @@ -2006,7 +2006,6 @@ static int main_menu_action(struct cfdisk *cf, int key) case 'W': /* Write */ { char buf[64] = { 0 }; - int rc; if (fdisk_is_readonly(cf->cxt)) { warn = _("Device open in read-only mode"); @@ -2098,8 +2097,9 @@ static int ui_run(struct cfdisk *cf) ui_warnx(_("Device open in read-only mode.")); do { - int rc = 0, key = getch(); + int key = getch(); + rc = 0; if (ui_resize) /* Note that ncurses getch() returns ERR when interrupted * by signal, but SLang does not interrupt at all. */ -- cgit v1.2.3-55-g7522