[dpdk-dev] [PATCH 3/4] examples/qos_sched: suppress GCC 7.1.1 warnings

Dumitrescu, Cristian cristian.dumitrescu at intel.com
Fri Jun 2 20:18:25 CEST 2017



> -----Original Message-----
> From: Jerin Jacob [mailto:jerin.jacob at caviumnetworks.com]
> Sent: Friday, June 2, 2017 12:21 PM
> To: dev at dpdk.org
> Cc: Richardson, Bruce <bruce.richardson at intel.com>;
> thomas at monjalon.net; Dumitrescu, Cristian
> <cristian.dumitrescu at intel.com>; yuanhan.liu at linux.intel.com;
> maxime.coquelin at redhat.com; Jerin Jacob
> <jerin.jacob at caviumnetworks.com>
> Subject: [dpdk-dev] [PATCH 3/4] examples/qos_sched: suppress GCC 7.1.1
> warnings
> 
> 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 at caviumnetworks.com>
> ---

Acked-by: Cristian.Dumitrescu at intel.com



More information about the dev mailing list