Pārlūkot izejas kodu

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>
Khem Raj 1 nedēļu atpakaļ
vecāks
revīzija
6443b3cdf5
1 mainītis faili ar 10 papildinājumiem un 0 dzēšanām
  1. 10 0
      meta/recipes-kernel/perf/perf.bb

+ 10 - 0
meta/recipes-kernel/perf/perf.bb

@@ -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 \