From: Jerin Jacob Date: Fri, 2 Jun 2017 11:20:30 +0000 (+0530) Subject: examples/qos_sched: suppress gcc 7.1.1 warning X-Git-Tag: spdx-start~3196 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=35f30466d65ebe8926720b30c9ed82c7142a9cae;p=dpdk.git examples/qos_sched: suppress gcc 7.1.1 warning This one is more of a compiler issue as application checks the app_parse_opt_vals() return value. Since this code is in slow path, adding a memset to fix following "maybe-uninitialized" warning. qos_sched/args.c: In function ‘app_parse_args’: examples/qos_sched/args.c:254:32: error: ‘vals[0]’ may be used uninitialized in this function [-Werror=maybe-uninitialized] pconf->rx_port = (uint8_t)vals[0]; ~~~~^~~ Signed-off-by: Jerin Jacob Acked-by: Cristian Dumitrescu --- diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c index 476a0ee1c0..2350d64f4a 100644 --- a/examples/qos_sched/args.c +++ b/examples/qos_sched/args.c @@ -245,6 +245,7 @@ app_parse_flow_conf(const char *conf_str) struct flow_conf *pconf; uint64_t mask; + memset(vals, 0, sizeof(vals)); ret = app_parse_opt_vals(conf_str, ',', 6, vals); if (ret < 4 || ret > 5) return ret;