Message ID | 20220518101657.1230416-8-david.marchand@redhat.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Thomas Monjalon |
Headers | show |
Series | Fix compilation with gcc 12 | expand |
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
diff --git a/drivers/net/ice/base/meson.build b/drivers/net/ice/base/meson.build index 3cf4ce05fa..89d8c5eba1 100644 --- a/drivers/net/ice/base/meson.build +++ b/drivers/net/ice/base/meson.build @@ -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
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(+)