From 24cb3d0681d9196d57176a0a94bfc6e610ef7b45 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sat, 1 Feb 2014 16:41:59 +1100 Subject: dtc: fix some more -Wshadow warnings Building on a RHEL6 system produced the following -Wshadow warnings in fstree.c, util.c and checks.c: cc1: warnings being treated as errors checks.c: In function 'parse_checks_option': checks.c:709: error: declaration of 'optarg' shadows a global declaration /usr/include/getopt.h:59: error: shadowed declaration is here make[1]: *** [checks.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: *** Waiting for unfinished jobs.... cc1: warnings being treated as errors fstree.c: In function 'read_fstree': fstree.c:40: error: declaration of 'tmpnam' shadows a global declaration /usr/include/stdio.h:208: error: shadowed declaration is here make[1]: *** [fstree.o] Error 1 cc1: warnings being treated as errors util.c: In function 'xstrdup': util.c:42: error: declaration of 'dup' shadows a global declaration /usr/include/unistd.h:528: error: shadowed declaration is here Fix all of these -Wshadow warnings by using slightly different variable names which won't collide with anything else. Signed-off-by: Florian Fainelli --- dtc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dtc.h') diff --git a/dtc.h b/dtc.h index 20e4d56..20de073 100644 --- a/dtc.h +++ b/dtc.h @@ -247,7 +247,7 @@ void sort_tree(struct boot_info *bi); /* Checks */ -void parse_checks_option(bool warn, bool error, const char *optarg); +void parse_checks_option(bool warn, bool error, const char *arg); void process_checks(bool force, struct boot_info *bi); /* Flattened trees */ -- cgit v1.2.1