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 <jerin.jacob@caviumnetworks.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
This commit is contained in:
Jerin Jacob 2017-06-02 16:50:30 +05:30 committed by Thomas Monjalon
parent 1122ba9aa1
commit 35f30466d6

View File

@ -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;