perf: Do not treat maybe-uninitialized warnings as errors

Clang finds more warnings in kernel code, make clang happy to not treat
these extra warnings as errors

(From OE-Core rev: c587f473a4581d1640aa227a23d517c51b7ec3cc)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj
2025-05-20 23:20:04 -07:00
committed by Richard Purdie
parent ee22a23e98
commit 6443b3cdf5

View File

@@ -81,6 +81,16 @@ LDFLAGS = "-ldl -lutil"
# avoiding the 'buildpaths' QA warning.
TARGET_CC_ARCH += "${SELECTED_OPTIMIZATION} ${DEBUG_PREFIX_MAP}"
#| libbpf.c: In function 'find_kernel_btf_id.constprop':
#| libbpf.c:10009:33: error: 'mod_len' may be used uninitialized [-Werror=maybe-uninitialized]
#| 10009 | if (mod_name && strncmp(mod->name, mod_name, mod_len) != 0)
#| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#| libbpf.c:9979:21: note: 'mod_len' was declared here
#| 9979 | int ret, i, mod_len;
#| | ^~~~~~~
#| cc1: all warnings being treated as errors
TARGET_CC_ARCH:append:toolchain-clang:arm = " -fno-error=maybe-uninitialized"
EXTRA_OEMAKE = '\
V=1 \
VF=1 \