event/sw: fix build for gcc 4.5.1
authorFerruh Yigit <ferruh.yigit@intel.com>
Thu, 6 Apr 2017 17:05:11 +0000 (18:05 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 6 Apr 2017 18:40:31 +0000 (20:40 +0200)
build error:
.../event/sw/sw_evdev_worker.c: In function ‘sw_event_release’:
.../event/sw/sw_evdev_worker.c:52:3: error: unknown field ‘op’ specified
in initializer

Fixed by updating struct initialization.

Fixes: 656af9180014 ("event/sw: add worker core functions")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
drivers/event/sw/sw_evdev_worker.c

index ed08778..b9b6f8d 100644 (file)
@@ -48,9 +48,8 @@ sw_event_release(struct sw_port *p, uint8_t index)
        RTE_SET_USED(index);
 
        /* create drop message */
-       struct rte_event ev = {
-               .op = sw_qe_flag_map[RTE_EVENT_OP_RELEASE],
-       };
+       struct rte_event ev;
+       ev.op = sw_qe_flag_map[RTE_EVENT_OP_RELEASE];
 
        uint16_t free_count;
        qe_ring_enqueue_burst(p->rx_worker_ring, &ev, 1, &free_count);