Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
6a974ff
)
vlib: use flexible array in vlib_buffer for GCC-10
34/28434/1
author
Benoît Ganne
<bganne@cisco.com>
Fri, 24 Apr 2020 09:48:04 +0000
(11:48 +0200)
committer
Andrew Yourtchenko
<ayourtch@gmail.com>
Tue, 18 Aug 2020 08:50:04 +0000
(08:50 +0000)
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
)
src/vlib/buffer.h
patch
|
blob
|
history
diff --git
a/src/vlib/buffer.h
b/src/vlib/buffer.h
index
02b6526
..
4e44a7a
100644
(file)
--- 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];