Skip to content

Commit ecabe99

Browse files
t-8chKAGA-KOKO
authored andcommitted
selftests: vDSO: vdso_config: Avoid -Wunused-variables
Not all users of this header make use of all its variables. For example vdso_test_correctness.c does not use "versions": In file included from vdso_test_correctness.c:22: vdso_config.h:61:20: warning: ‘versions’ defined but not used [-Wunused-variable] 61 | static const char *versions[7] = { | ^~~~~~~~ Avoid those warnings through attribute((unused)). Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Link: https://lore.kernel.org/all/20250611-selftests-vdso-fixes-v3-5-e62e37a6bcf5@linutronix.de
1 parent b8ae430 commit ecabe99

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tools/testing/selftests/vDSO/vdso_config.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
#define VDSO_NAMES 1
5959
#endif
6060

61+
__attribute__((unused))
6162
static const char *versions[7] = {
6263
"LINUX_2.6",
6364
"LINUX_2.6.15",
@@ -68,6 +69,7 @@ static const char *versions[7] = {
6869
"LINUX_5.10"
6970
};
7071

72+
__attribute__((unused))
7173
static const char *names[2][7] = {
7274
{
7375
"__kernel_gettimeofday",

0 commit comments

Comments
 (0)