[android-common:android15-6.6-2026-07 8/8] lib/test_ubsan.c:43:4: warning: variable 'data' set but not used
kernel test robot <[email protected]>
| Newsgroups | dev.linux.lists.oe-kbuild-all |
|---|---|
| Message-ID | <[email protected]> |
tree: https://android.googlesource.com/kernel/common android15-6.6-2026-07 head: 407989faed8855296b26bfb40a621f478331816c commit: aa0cf04b6959adbb54b536307d590d2a350d02d7 [8/8] ubsan: Fix panic from test_ubsan_out_of_bounds config: arm-randconfig-001-20260716 (https://download.01.org/0day-ci/archive/20260717/[email protected]/config) compiler: arm-linux-gnueabi-gcc (GCC) 8.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260717/[email protected]/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ All warnings (new ones prefixed by >>): lib/test_ubsan.c: In function 'test_ubsan_out_of_bounds': >> lib/test_ubsan.c:43:4: warning: variable 'data' set but not used [-Wunused-but-set-variable] } data; ^~~~ lib/test_ubsan.c: In function 'test_ubsan_load_invalid_value': lib/test_ubsan.c:66:37: warning: variable 'eptr' set but not used [-Wunused-but-set-variable] enum ubsan_test_enum eval, eval2, *eptr; ^~~~ lib/test_ubsan.c:65:19: warning: variable 'ptr' set but not used [-Wunused-but-set-variable] bool val, val2, *ptr; ^~~ At top level: lib/test_ubsan.c:104:28: warning: 'skip_ubsan_array' defined but not used [-Wunused-const-variable=] static const test_ubsan_fp skip_ubsan_array[] = { ^~~~~~~~~~~~~~~~ vim +/data +43 lib/test_ubsan.c 35 36 static void test_ubsan_out_of_bounds(void) 37 { 38 int i = 4, j = 4, k = -1; 39 volatile struct { 40 char above[4]; /* Protect surrounding memory. */ 41 int arr[4]; 42 char below[4]; /* Protect surrounding memory. */ > 43 } data; 44 45 OPTIMIZER_HIDE_VAR(i); 46 OPTIMIZER_HIDE_VAR(j); 47 OPTIMIZER_HIDE_VAR(k); 48 49 UBSAN_TEST(CONFIG_UBSAN_BOUNDS, "above"); 50 data.arr[j] = i; 51 52 UBSAN_TEST(CONFIG_UBSAN_BOUNDS, "below"); 53 data.arr[k] = i; 54 } 55 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki