]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
perf: Do not treat maybe-uninitialized warnings as errors
authorKhem Raj <raj.khem@gmail.com>
Wed, 21 May 2025 06:20:04 +0000 (23:20 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 22 May 2025 13:36:18 +0000 (14:36 +0100)
Clang finds more warnings in kernel code, make clang happy to not treat
these extra warnings as errors

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>
meta/recipes-kernel/perf/perf.bb

index d06dd2fa5a2bb9b2982572081ef57e2dbafbd5da..0d19e1bdc222da26a5ad0a1d4964acca437a6692 100644 (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 \