examples/eventdev: fix build with GCC < 5
authorThomas Monjalon <thomas@monjalon.net>
Sun, 21 Jan 2018 22:08:58 +0000 (23:08 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 21 Jan 2018 22:40:50 +0000 (23:40 +0100)
commit785482203fdaa9bb0053cac6d74c2a045dd573d1
tree90b793663ac42aac880a952cc26777381b6382ab
parenta1472935a8b81a328ed8d6f553ee2523fea96757
examples/eventdev: fix build with GCC < 5

Some errors were seen with GCC 4.8 and 4.9.
It looks to be a bug fixed in GCC 5.

examples/eventdev_pipeline/pipeline_worker_generic.c:474:4: error:
missing initializer for field 'queue_id' of 'struct <anonymous>'

examples/eventdev_pipeline/pipeline_worker_generic.c:475:3: error:
missing initializer for field 'priority' of 'struct <anonymous>'

examples/eventdev_pipeline/pipeline_worker_tx.c:630:2: error:
missing initializer for field 'queue_id' of 'struct <anonymous>'

The workaround is to not use initializer statement,
but to use memset and standard assignment.

Fixes: 84dde5de10a2 ("examples/eventdev: support Rx adapter")
Fixes: fa8054c8c889 ("examples/eventdev: add thread safe Tx worker pipeline")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
examples/eventdev_pipeline/pipeline_worker_generic.c
examples/eventdev_pipeline/pipeline_worker_tx.c