mbuf: Initialize all fields in struct rte_mbuf_sched

Message ID 1548340597-18556-1-git-send-email-ed.czeck@atomicrules.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series mbuf: Initialize all fields in struct rte_mbuf_sched |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Performance-Testing success Performance Testing PASS
ci/mellanox-Performance-Testing success Performance Testing PASS

Commit Message

Ed Czeck Jan. 24, 2019, 2:36 p.m. UTC
  g++ reports "error: missing initializer for member"
Fixes: 5d3f72100904 (mbuf: implement generic format for sched field)

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
---
 lib/librte_mbuf/rte_mbuf.h | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Stephen Hemminger Jan. 24, 2019, 8:34 p.m. UTC | #1
On Thu, 24 Jan 2019 09:36:37 -0500
Ed Czeck <ed.czeck@atomicrules.com> wrote:

> g++ reports "error: missing initializer for member"
> Fixes: 5d3f72100904 (mbuf: implement generic format for sched field)
> 
> Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
> ---
>  lib/librte_mbuf/rte_mbuf.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
> index d716294..a7f6702 100644
> --- a/lib/librte_mbuf/rte_mbuf.h
> +++ b/lib/librte_mbuf/rte_mbuf.h
> @@ -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.
  
Thomas Monjalon Jan. 27, 2019, 11:38 p.m. UTC | #2
24/01/2019 15:36, Ed Czeck:
> g++ reports "error: missing initializer for member"
> Fixes: 5d3f72100904 (mbuf: implement generic format for sched field)
> 
> Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>

Applied, thanks
  

Patch

diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index d716294..a7f6702 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -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,
 			};
 }