ring: fix declaration after statement
authorAndy Green <andy@warmcat.com>
Mon, 28 May 2018 09:03:38 +0000 (17:03 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 26 Jul 2018 14:11:51 +0000 (16:11 +0200)
commit44c41b85775cdc084545ec3aa918b81e93d8d387
tree354085bd8c10992f1a82339b07da8c47aa10fea4
parent1f184cb79bb0e17bda688d2b93578c2afef64f21
ring: fix declaration after statement

On gcc 5.4.0 / native aarch64 from Ubuntu 16.04:

In function '__rte_ring_move_prod_head':
rte_ring_c11_mem.h:69:3: warning:
ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
   const uint32_t cons_tail = r->cons.tail;
   ^

In function '__rte_ring_move_cons_head':
rte_ring_c11_mem.h:136:3: warning:
ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
   const uint32_t prod_tail = r->prod.tail;
   ^

Fixes: 39368ebfc6 ("ring: introduce C11 memory model barrier option")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_ring/rte_ring_c11_mem.h