Thread (2 messages) flat view 2 messages, 2 authors, 2022-08-02

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

From: Michael Ellerman <hidden>
Date: 2022-08-02 11:04:56

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_mmcr2’:
  cycles_with_mmcr2_test.c:81:17: error: ‘actual’ may be used uninitialized [-Werror=maybe-uninitialized]
     81 |                 printf("Bad MMCR2 value seen is 0x%lx\n", actual);

[...]
Applied to powerpc/next.

[1/1] selftests/powerpc: Avoid GCC 12 uninitialised variable warning
      https://git.kernel.org/powerpc/c/ff446cd76854d47f451a84c26bb70934ae2ec5a7

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help