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 --- libmount/src/tab_parse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libmount/src/tab_parse.c') diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c index 58b71ca4e..05496f760 100644 --- a/libmount/src/tab_parse.c +++ b/libmount/src/tab_parse.c @@ -173,10 +173,10 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, char *s) /* remove "(deleted)" suffix */ sz = strlen(fs->target); if (sz > PATH_DELETED_SUFFIX_SZ) { - char *p = fs->target + (sz - PATH_DELETED_SUFFIX_SZ); + char *ptr = fs->target + (sz - PATH_DELETED_SUFFIX_SZ); - if (strcmp(p, PATH_DELETED_SUFFIX) == 0) - *p = '\0'; + if (strcmp(ptr, PATH_DELETED_SUFFIX) == 0) + *ptr = '\0'; } unmangle_string(fs->root); -- cgit v1.2.3-55-g7522