Re: [PATCH] selftests/powerpc: Avoid GCC 12 uninitialised variable warning

2022-08-02 Thread Michael Ellerman
On Mon, 1 Aug 2022 21:37:46 +1000, Michael Ellerman wrote: > GCC 12 thinks that `actual` might be used uninitialised. It's not, the > use is guarded by `bad_mmcr2` which is only set to true at the same > point where `actual` is initialised. > > cycles_with_mmcr2_test.c: In function ‘cycles_with_

[PATCH] selftests/powerpc: Avoid GCC 12 uninitialised variable warning

2022-08-01 Thread Michael Ellerman
GCC 12 thinks that `actual` might be used uninitialised. It's not, the use is guarded by `bad_mmcr2` which is only set to true at the same point where `actual` is initialised. cycles_with_mmcr2_test.c: In function ‘cycles_with_mmcr2’: cycles_with_mmcr2_test.c:81:17: error: ‘actual’ may be used