aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/mm/mremap_test.c
diff options
context:
space:
mode:
authorKevin Brodsky <[email protected]>2024-12-09 09:50:07 +0000
committerAndrew Morton <[email protected]>2025-01-14 06:40:53 +0000
commit516fb516383ef39d881d116c6447826356883ad0 (patch)
treefee998f3de62f909e37cc96cd3de51c49b133d53 /tools/testing/selftests/mm/mremap_test.c
parentselftests/mm: fix condition in uffd_move_test_common() (diff)
downloadkernel-516fb516383ef39d881d116c6447826356883ad0.tar.gz
kernel-516fb516383ef39d881d116c6447826356883ad0.zip
selftests/mm: fix -Wmaybe-uninitialized warnings
A few -Wmaybe-uninitialized warnings show up when building the mm tests with -O2. None of them looks worrying; silence them by initialising the problematic variables. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Kevin Brodsky <[email protected]> Cc: Aruna Ramakrishna <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Joey Gouly <[email protected]> Cc: Keith Lucas <[email protected]> Cc: Ryan Roberts <[email protected]> Cc: Shuah Khan <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/testing/selftests/mm/mremap_test.c')
-rw-r--r--tools/testing/selftests/mm/mremap_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/mm/mremap_test.c b/tools/testing/selftests/mm/mremap_test.c
index d207a52f2b5b..bb84476a177f 100644
--- a/tools/testing/selftests/mm/mremap_test.c
+++ b/tools/testing/selftests/mm/mremap_test.c
@@ -384,7 +384,7 @@ out:
static long long remap_region(struct config c, unsigned int threshold_mb,
char *rand_addr)
{
- void *addr, *src_addr, *dest_addr, *dest_preamble_addr;
+ void *addr, *src_addr, *dest_addr, *dest_preamble_addr = NULL;
unsigned long long t, d;
struct timespec t_start = {0, 0}, t_end = {0, 0};
long long start_ns, end_ns, align_mask, ret, offset;