dpdk/Makefile: Fix GCC12 error array bounds.

This is known as a false positive of GCC12.
For present, we can avoid it using Wno-array-bounds
to go on.

fixes issue #2668.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I99551348c33292fc2352a570d88f706661c8b9b2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14281
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
yidong0635 2022-08-31 15:33:13 +08:00 committed by Tomasz Zawadzki
parent 4bd26da22f
commit 2ac7ec79e9

View File

@ -121,6 +121,9 @@ ifeq ($(shell test $(GCC_MAJOR) -ge 12 && echo 1), 1)
# 3. gcc 12 reports reading incorect size from a region. Seems like false positive,
# see issue #2460
DPDK_CFLAGS += -Wno-stringop-overread
# 4. gcc 12 reports array subscript * is outside array bounds. Seems like false positive,
# see issue #2668
DPDK_CFLAGS += -Wno-array-bounds
endif
endif
endif