linux/kernel/kcsan
Marco Elver 9872916ad1 kcsan: test: Initialize dummy variable
Newer compiler versions rightfully point out:

 kernel/kcsan/kcsan_test.c:591:41: error: variable 'dummy' is
 uninitialized when passed as a const pointer argument here
 [-Werror,-Wuninitialized-const-pointer]
   591 |         KCSAN_EXPECT_READ_BARRIER(atomic_read(&dummy), false);
       |                                                ^~~~~
 1 error generated.

Although this particular test does not care about the value stored in
the dummy atomic variable, let's silence the warning.

Link: https://lkml.kernel.org/r/CA+G9fYu8JY=k-r0hnBRSkQQrFJ1Bz+ShdXNwC1TNeMt0eXaxeA@mail.gmail.com
Fixes: 8bc32b3481 ("kcsan: test: Add test cases for memory barrier instrumentation")
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Reviewed-by: Alexander Potapenko <glider@google.com>
Signed-off-by: Marco Elver <elver@google.com>
2025-07-23 08:51:32 +02:00
..
.kunitconfig kcsan: test: Add a .kunitconfig to run KCSAN tests 2022-07-22 09:22:59 -06:00
core.c kcsan: Don't expect 64 bits atomic builtins from 32 bits architectures 2023-06-09 23:29:50 +10:00
debugfs.c kcsan: Remove redundant call of kallsyms_lookup_name() 2024-10-14 16:44:56 +02:00
encoding.h kcsan: Add missing license and copyright headers 2021-03-08 14:27:43 -08:00
kcsan.h kcsan: Add ability to pass instruction pointer of access to reporting 2021-09-13 16:41:19 -07:00
kcsan_test.c kcsan: test: Initialize dummy variable 2025-07-23 08:51:32 +02:00
Makefile kcsan: avoid passing -g for test 2023-03-23 17:18:35 -07:00
permissive.h kcsan: permissive: Ignore data-racy 1-bit value changes 2021-07-20 13:49:44 -07:00
report.c panic: Consolidate open-coded panic_on_warn checks 2022-12-02 13:04:44 -08:00
selftest.c mm: delete checks for xor_unlock_is_negative_byte() 2023-10-18 14:34:17 -07:00