[PATCH v2] selftests/powerpc: Suppress -Wmaybe-uninitialized with GCC 15
Madhavan Srinivasan
maddy at linux.ibm.com
Wed Apr 8 14:28:17 AEST 2026
On Fri, 13 Mar 2026 22:24:26 +0530, Amit Machhiwal wrote:
> GCC 15 reports the below false positive '-Wmaybe-uninitialized' warning
> in vphn_unpack_associativity() when building the powerpc selftests.
>
> # make -C tools/testing/selftests TARGETS="powerpc"
> [...]
> CC test-vphn
> In file included from test-vphn.c:3:
> In function ‘vphn_unpack_associativity’,
> inlined from ‘test_one’ at test-vphn.c:371:2,
> inlined from ‘test_vphn’ at test-vphn.c:399:9:
> test-vphn.c:10:33: error: ‘be_packed’ may be used uninitialized [-Werror=maybe-uninitialized]
> 10 | #define be16_to_cpup(x) bswap_16(*x)
> | ^~~~~~~~
> vphn.c:42:27: note: in expansion of macro ‘be16_to_cpup’
> 42 | u16 new = be16_to_cpup(field++);
> | ^~~~~~~~~~~~
> In file included from test-vphn.c:19:
> vphn.c: In function ‘test_vphn’:
> vphn.c:27:16: note: ‘be_packed’ declared here
> 27 | __be64 be_packed[VPHN_REGISTER_COUNT];
> | ^~~~~~~~~
> cc1: all warnings being treated as errors
>
> [...]
Applied to powerpc/next.
[1/1] selftests/powerpc: Suppress -Wmaybe-uninitialized with GCC 15
https://git.kernel.org/powerpc/c/6e65886fceb23605eff952d6b1975737b4c4b154
cheers
More information about the Linuxppc-dev
mailing list