[07/12] net/ice/base: fix build with GCC 12
Checks
Commit Message
GCC 12 raises the following warning:
../drivers/net/ice/base/ice_switch.c: In function ‘ice_add_sw_recipe’:
../drivers/net/ice/base/ice_switch.c:7219:61: error: writing 1 byte
into a region of size 0 [-Werror=stringop-overflow=]
7219 | buf[recps].content.lkup_indx[i + 1] = entry->fv_idx[i];
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from ../drivers/net/ice/base/ice_controlq.h:8,
from ../drivers/net/ice/base/ice_type.h:54,
from ../drivers/net/ice/base/ice_common.h:8,
from ../drivers/net/ice/base/ice_switch.h:8,
from ../drivers/net/ice/base/ice_switch.c:5:
../drivers/net/ice/base/ice_adminq_cmd.h:744:12: note: at offset 5
into destination object ‘lkup_indx’ of size 5
744 | u8 lkup_indx[5];
| ^~~~~~~~~
Since this code is in the base driver, waive the check until the base
driver is fixed by the relevant people.
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/net/ice/base/meson.build | 5 +++++
1 file changed, 5 insertions(+)
@@ -40,6 +40,11 @@ if (toolchain == 'gcc' and cc.version().version_compare('>=11.0.0'))
error_cflags += ['-Wno-array-bounds']
endif
+# FIXME
+if (toolchain == 'gcc' and cc.version().version_compare('>=12.0.0'))
+ error_cflags += ['-Wno-stringop-overflow']
+endif
+
if is_windows and cc.get_id() != 'clang'
cflags += ['-fno-asynchronous-unwind-tables']
endif