diff options
author | Phil Sutter <phil@nwl.cc> | 2020-10-08 14:51:52 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2020-10-12 13:27:23 +0200 |
commit | c6cff7ddd4ee8ac8b500a9c928612acf39bfa9ec (patch) | |
tree | 7e20e8dcb1e1b1f17716705452e17cb3a6f426dc /extensions/libebt_vlan.c | |
parent | 0bd7a8eaf3582159490ab355b1217a4e42ed021f (diff) |
libiptc: Avoid gcc-10 zero-length array warning
Gcc-10 doesn't like the use of zero-length arrays as last struct member
to denote variable sized objects. The suggested alternative, namely to
use a flexible array member as defined by C99, is problematic as that
doesn't allow for said struct to be embedded into others. With the
relevant structs being part of kernel UAPI, this can't be precluded
though.
The call to memcpy() which triggers the warning copies data from one
struct xt_counters to another. Since this struct is flat and merely
contains two u64 fields, One can use direct assignment instead which
avoids the warning.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'extensions/libebt_vlan.c')
0 files changed, 0 insertions, 0 deletions