diff options
author | Anshuman Khandual <anshuman.khandual@arm.com> | 2025-04-09 15:20:06 +0530 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2025-04-11 17:32:41 -0700 |
commit | 92868577d05ff75f9f38c6345ed275203827faba (patch) | |
tree | 4acc73b53d38d0caf2fc1e437d4574149429538d /rust/helpers/workqueue.c | |
parent | e6e07b696da529e85d1ba880555b5df5c80a46bd (diff) | |
download | linux-92868577d05ff75f9f38c6345ed275203827faba.tar.gz linux-92868577d05ff75f9f38c6345ed275203827faba.tar.bz2 linux-92868577d05ff75f9f38c6345ed275203827faba.zip |
selftests/mm: fix compiler -Wmaybe-uninitialized warning
Following build warning comes up for cow test as 'transferred' variable has
not been initialized. Fix the warning via zero init for the variable.
CC cow
cow.c: In function `do_test_vmsplice_in_parent':
cow.c:365:61: warning: `transferred' may be used uninitialized [-Wmaybe-uninitialized]
365 | cur = read(fds[0], new + total, transferred - total);
| ~~~~~~~~~~~~^~~~~~~
cow.c:296:29: note: `transferred' was declared here
296 | ssize_t cur, total, transferred;
| ^~~~~~~~~~~
CC compaction_test
CC gup_longterm
Link: https://lkml.kernel.org/r/20250409095006.1422620-1-anshuman.khandual@arm.com
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'rust/helpers/workqueue.c')
0 files changed, 0 insertions, 0 deletions