CC fd-files.o fd-files.c: In function ‘list_to_index’: fd-files.c:216:15: warning: declaration of ‘index’ shadows a global declaration [-Wshadow] CC fds.o fds.c: In function ‘process_disable_fds_param’: fds.c:164:38: warning: declaration of ‘optarg’ shadows a global declaration [-Wshadow] Signed-off-by: Brian Haley <brian.haley@xxxxxx> --- fd-files.c | 8 ++++---- fds.c | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/fd-files.c b/fd-files.c index 6e0e37d..59dce01 100644 --- a/fd-files.c +++ b/fd-files.c @@ -213,14 +213,14 @@ static const char ** list_to_index(struct namelist *namelist) { struct list_head *node, *tmp; struct namelist *nl; - const char **index; + const char **findex; unsigned int i = 0; - index = zmalloc(sizeof(char *) * files_in_index); + findex = zmalloc(sizeof(char *) * files_in_index); list_for_each_safe(node, tmp, &namelist->list) { nl = (struct namelist *) node; - index[i++] = nl->name; + findex[i++] = nl->name; /* Destroy the list head, but keep the ->name alloc because * now the index points to it. @@ -232,7 +232,7 @@ static const char ** list_to_index(struct namelist *namelist) free(names); names = NULL; - return index; + return findex; } static void generate_filelist(void) diff --git a/fds.c b/fds.c index ad963f9..79febcd 100644 --- a/fds.c +++ b/fds.c @@ -161,23 +161,23 @@ static void disable_fds_param(char *str) exit(EXIT_FAILURE); } -void process_disable_fds_param(char *optarg) +void process_disable_fds_param(char *param) { unsigned int len, i; - char *str = optarg; + char *str = param; - len = strlen(optarg); + len = strlen(param); /* Check if there are any commas. If so, split them into multiple params, * validating them as we go. */ for (i = 0; i < len; i++) { - if (optarg[i] == ',') { - optarg[i] = 0; + if (param[i] == ',') { + param[i] = 0; disable_fds_param(str); - str = optarg + i + 1; + str = param + i + 1; } } - if (str < optarg + len) + if (str < param + len) disable_fds_param(str); } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe trinity" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html