diff options
author | Arnd Bergmann <arnd@arndb.de> | 2024-04-03 11:06:20 +0300 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2024-04-04 00:35:57 +0300 |
commit | bbda3ba626b9f57ff6063058877eca856f5b734d (patch) | |
tree | 0c3461f98e3d1b2d9d026078f776564c78ae9fdc /lib/test_ubsan.c | |
parent | e7d24c0aa8e678f41457d1304e2091cac6fd1a2e (diff) | |
download | linux-bbda3ba626b9f57ff6063058877eca856f5b734d.tar.xz |
ubsan: fix unused variable warning in test module
This is one of the drivers with an unused variable that is marked 'const'.
Adding a __used annotation here avoids the warning and lets us enable
the option by default:
lib/test_ubsan.c:137:28: error: unused variable 'skip_ubsan_array' [-Werror,-Wunused-const-variable]
Fixes: 4a26f49b7b3d ("ubsan: expand tests and reporting")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240403080702.3509288-3-arnd@kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'lib/test_ubsan.c')
-rw-r--r-- | lib/test_ubsan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/test_ubsan.c b/lib/test_ubsan.c index 276c12140ee2..c288df9372ed 100644 --- a/lib/test_ubsan.c +++ b/lib/test_ubsan.c @@ -134,7 +134,7 @@ static const test_ubsan_fp test_ubsan_array[] = { }; /* Excluded because they Oops the module. */ -static const test_ubsan_fp skip_ubsan_array[] = { +static __used const test_ubsan_fp skip_ubsan_array[] = { test_ubsan_divrem_overflow, }; |