aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/powerpc/mm
diff options
context:
space:
mode:
authorHarish <harish@linux.ibm.com>2020-12-01 14:54:03 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2020-12-04 01:01:21 +1100
commitc9344769e2b46ba28b947bec7a8a8f0a091ecd57 (patch)
treef4d2b0ae604c438d225fc4e04332d4bb099a78fb /tools/testing/selftests/powerpc/mm
parentselftests/powerpc: update .gitignore (diff)
downloadwireguard-linux-c9344769e2b46ba28b947bec7a8a8f0a091ecd57.tar.xz
wireguard-linux-c9344769e2b46ba28b947bec7a8a8f0a091ecd57.zip
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
Diffstat (limited to 'tools/testing/selftests/powerpc/mm')
-rw-r--r--tools/testing/selftests/powerpc/mm/bad_accesses.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/powerpc/mm/bad_accesses.c b/tools/testing/selftests/powerpc/mm/bad_accesses.c
index fd747b2ffcfc..65d2148b05dc 100644
--- a/tools/testing/selftests/powerpc/mm/bad_accesses.c
+++ b/tools/testing/selftests/powerpc/mm/bad_accesses.c
@@ -38,7 +38,7 @@ static void segv_handler(int n, siginfo_t *info, void *ctxt_v)
int bad_access(char *p, bool write)
{
- char x;
+ char x = 0;
fault_code = 0;
fault_addr = 0;