Fix shadow variable warning by renaming the parameter from 'portmask' to 'mask' in parse_portmask() to avoid shadowing the global variable.
../examples/packet_ordering/main.c:147:28: warning: declaration of 'portmask' shadows a global declaration [-Wshadow] Signed-off-by: Stephen Hemminger <[email protected]> --- examples/packet_ordering/main.c | 6 +++--- examples/packet_ordering/meson.build | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c index 748fe0826a..0279faf081 100644 --- a/examples/packet_ordering/main.c +++ b/examples/packet_ordering/main.c @@ -144,14 +144,14 @@ print_usage(const char *prgname) } static int -parse_portmask(const char *portmask) +parse_portmask(const char *mask) { unsigned long pm; char *end = NULL; /* parse hexadecimal string */ - pm = strtoul(portmask, &end, 16); - if ((portmask[0] == '\0') || (end == NULL) || (*end != '\0')) + pm = strtoul(mask, &end, 16); + if ((mask[0] == '\0') || (end == NULL) || (*end != '\0')) return 0; return pm; diff --git a/examples/packet_ordering/meson.build b/examples/packet_ordering/meson.build index 092a5258ef..f8be053fb0 100644 --- a/examples/packet_ordering/meson.build +++ b/examples/packet_ordering/meson.build @@ -11,4 +11,3 @@ deps += 'reorder' sources = files( 'main.c', ) -cflags += no_shadow_cflag -- 2.53.0

