[dpdk-dev] [PATCH] examples/ip_pipeline: fix build error for gcc 4.8

Thomas Monjalon thomas.monjalon at 6wind.com
Tue Jun 14 21:04:16 CEST 2016


2016-06-09 13:38, Daniel Mrzyglod:
> This patch fixes a maybe-uninitialized warning when compiling DPDK with GCC 4.8
> 
> examples/ip_pipeline/pipeline/pipeline_common_fe.c: In function 'app_pipeline_track_pktq_out_to_link':
> examples/ip_pipeline/pipeline/pipeline_common_fe.c:66:31: error:
> 'reader' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> 
>    struct app_pktq_out_params *pktq_out =
> 
> Fixes: 760064838ec0 ("examples/ip_pipeline: link routing output ports to devices")
> 
> Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod at intel.com>

For a weird reason, this patch triggers a new error:

examples/ip_pipeline/pipeline/pipeline_common_fe.c:In function ‘app_pipeline_track_pktq_out_to_link’:
examples/ip_pipeline/pipeline/pipeline_common_fe.c:124:11:
error: ‘id’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
    status = ptype->fe_ops->f_track(&pp,
           ^
In file included from examples/ip_pipeline/pipeline/pipeline_common_fe.h:44:0,
                 from examples/ip_pipeline/pipeline/pipeline_common_fe.c:47:
examples/ip_pipeline/app.h:734:26: note: ‘id’ was declared here
  uint32_t n_readers = 0, id, i;
                          ^
examples/ip_pipeline/pipeline/pipeline_common_fe.c:97:11:
error: ‘id’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
    status = ptype->fe_ops->f_track(&pp,
           ^
In file included from examples/ip_pipeline/pipeline/pipeline_common_fe.h:44:0,
                 from examples/ip_pipeline/pipeline/pipeline_common_fe.c:47:
examples/ip_pipeline/app.h:674:26: note: ‘id’ was declared here
  uint32_t n_readers = 0, id, i;
                          ^


More information about the dev mailing list