Skip to contentSkip to conversation

mbuf: Initialize all fields in struct rte_mbuf_sched

PATCH Applied Ed Czeck 3 participants 3 messages Jan 24, 2019 – Jan 27, 2019

lore
Share & tools
lore

Ed Czeck

author
#0 lore raw

PATCH 1/1 mbuf: Initialize all fields in struct rte_mbuf_sched

g++ reports "error: missing initializer for member"

Fixes 5d3f72100904 (mbuf: implement generic format for sched field)
---
 lib/librte_mbuf/rte_mbuf.h | 1 +
 1 file changed, 1 insertion(+)
lib/librte_mbuf/rte_mbuf.h +1 -0
index d716294..a7f6702 100644
@@ -2464,6 +2464,7 @@ rte_mbuf_sched_set(struct rte_mbuf *m, uint32_t queue_id,
 				.queue_id = queue_id,
 				.traffic_class = traffic_class,
 				.color = color,
+				.reserved = 0,
 			};
 }
 
Signature · 1 line
2.7.4
#1 lore raw
Quoted 13 lines · On Thu, 24 Jan 2019 09:36:37 -0500 Ed Czeck <[email protected]> wrote:

g++ reports "error: missing initializer for member"

Fixes 5d3f72100904 (mbuf: implement generic format for sched field)
---
 lib/librte_mbuf/rte_mbuf.h | 1 +
 1 file changed, 1 insertion(+)
lib/librte_mbuf/rte_mbuf.h +0 -0
index d716294..a7f6702 100644

lib/librte_mbuf/rte_mbuf.h rte_mbuf_sched_set(struct rte_mbuf *m, uint32_t queue_id, · line 2470

Quoted 7 lines
lib/librte_mbuf/rte_mbuf.h +1 -0
@@ -2464,6 +2464,7 @@ rte_mbuf_sched_set(struct rte_mbuf *m, uint32_t queue_id,
 				.queue_id = queue_id,
 				.traffic_class = traffic_class,
 				.color = color,
+				.reserved = 0,
 			};
 }
 

This only happens because C++ is picker than C.