diff options
author | Sami Kerola | 2017-03-05 22:02:53 +0100 |
---|---|---|
committer | Sami Kerola | 2017-03-17 22:22:26 +0100 |
commit | 4ff3d13b439b40a91d96a10364cacdf6f0a577a3 (patch) | |
tree | 98a5ec4d1195d4ec0ac405608b7c3b074a2f89d3 /libsmartcols | |
parent | tests: refresh lscpu tests (diff) | |
download | kernel-qcow2-util-linux-4ff3d13b439b40a91d96a10364cacdf6f0a577a3.tar.gz kernel-qcow2-util-linux-4ff3d13b439b40a91d96a10364cacdf6f0a577a3.tar.xz kernel-qcow2-util-linux-4ff3d13b439b40a91d96a10364cacdf6f0a577a3.zip |
libsmartcols: fix test variable shadowing
libsmartcols/samples/fromfile.c:57:16: warning: declaration of 'flags'
shadows a global declaration [-Wshadow]
libsmartcols/samples/fromfile.c:29:33: note: shadowed declaration is here
libsmartcols/samples/fromfile.c:101:8: warning: declaration of 'flags'
shadows a global declaration [-Wshadow]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'libsmartcols')
-rw-r--r-- | libsmartcols/samples/fromfile.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libsmartcols/samples/fromfile.c b/libsmartcols/samples/fromfile.c index 4c9fca468..1a90e2d4b 100644 --- a/libsmartcols/samples/fromfile.c +++ b/libsmartcols/samples/fromfile.c @@ -54,12 +54,12 @@ static long name_to_flag(const char *name, size_t namesz) static int parse_column_flags(char *str) { - unsigned long flags = 0; + unsigned long num_flags = 0; - if (string_to_bitmask(str, &flags, name_to_flag)) + if (string_to_bitmask(str, &num_flags, name_to_flag)) err(EXIT_FAILURE, "failed to parse column flags"); - return flags; + return num_flags; } static struct libscols_column *parse_column(FILE *f) @@ -98,8 +98,8 @@ static struct libscols_column *parse_column(FILE *f) } case 2: /* FLAGS */ { - int flags = parse_column_flags(line); - if (scols_column_set_flags(cl, flags)) + int num_flags = parse_column_flags(line); + if (scols_column_set_flags(cl, num_flags)) goto fail; if (strcmp(line, "wrapnl") == 0) { scols_column_set_wrapfunc(cl, |