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 --- sys-utils/swapon.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sys-utils/swapon.c') diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c index 8a3a21739..c5106abcc 100644 --- a/sys-utils/swapon.c +++ b/sys-utils/swapon.c @@ -643,35 +643,35 @@ static int swapon_by_uuid(const char *uuid, int prio, int dsc) /* -o or fstab */ static int parse_options(const char *optstr, - int *priority, int *discard, int *nofail) + int *prio, int *disc, int *nofail) { char *arg = NULL; assert(optstr); - assert(priority); - assert(discard); + assert(prio); + assert(disc); assert(nofail); if (mnt_optstr_get_option(optstr, "nofail", NULL, 0) == 0) *nofail = 1; if (mnt_optstr_get_option(optstr, "discard", &arg, NULL) == 0) { - *discard |= SWAP_FLAG_DISCARD; + *disc |= SWAP_FLAG_DISCARD; if (arg) { /* only single-time discards are wanted */ if (strcmp(arg, "once") == 0) - *discard |= SWAP_FLAG_DISCARD_ONCE; + *disc |= SWAP_FLAG_DISCARD_ONCE; /* do discard for every released swap page */ if (strcmp(arg, "pages") == 0) - *discard |= SWAP_FLAG_DISCARD_PAGES; + *disc |= SWAP_FLAG_DISCARD_PAGES; } } arg = NULL; if (mnt_optstr_get_option(optstr, "pri", &arg, NULL) == 0 && arg) - *priority = atoi(arg); + *prio = atoi(arg); return 0; } -- cgit v1.2.3-55-g7522