selftests/powerpc: Fix uninitialized variable warning
authorHarish <harish@linux.ibm.com>
Tue, 1 Dec 2020 09:24:03 +0000 (14:54 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 3 Dec 2020 14:01:21 +0000 (01:01 +1100)
commitc9344769e2b46ba28b947bec7a8a8f0a091ecd57
treef4d2b0ae604c438d225fc4e04332d4bb099a78fb
parentf0812f6ca8299e864fe0f41bd7ffdaae3ce7630e
selftests/powerpc: Fix uninitialized variable warning

Patch fixes uninitialized variable warning in bad_accesses test
which causes the selftests build to fail in older distibutions

bad_accesses.c: In function ‘bad_access’:
bad_accesses.c:52:9: error: ‘x’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   printf("Bad - no SEGV! (%c)\n", x);
         ^
cc1: all warnings being treated as errors

Signed-off-by: Harish <harish@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201201092403.238182-1-harish@linux.ibm.com
tools/testing/selftests/powerpc/mm/bad_accesses.c