summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2020-04-24 11:48:04 +0200
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-08-18 08:50:04 +0000
commit1a81cf3b82e5b4a8cf8f90cb18eee10ab0275add (patch)
tree241fe469167772bfe3fc374b82ebb0c2d9fe1c36
parent6a974ff25e7a0ea6ad65c3e1285fd3bd0a25c1de (diff)
vlib: use flexible array in vlib_buffer for GCC-10
GCC-10 increase overflows-related warnings but gets confused by 0-length arrays. Use C99 flexible length array instead. Type: fix Change-Id: Ie62cfa8faaa408479a598785fd3f06ffd0233c7a Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit 049d0b438ef2971181549f195c7e0338cd1c60f4)
-rw-r--r--src/vlib/buffer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vlib/buffer.h b/src/vlib/buffer.h
index 02b65264724..4e44a7a802c 100644
--- a/src/vlib/buffer.h
+++ b/src/vlib/buffer.h
@@ -178,7 +178,7 @@ typedef union
u8 pre_data[VLIB_BUFFER_PRE_DATA_SIZE];
/** Packet data */
- u8 data[0];
+ u8 data[];
};
#ifdef CLIB_HAVE_VEC128
u8x16 as_u8x16[4];