tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: ceb2fe0d438644e1de06b9a6468a1fb8e2199c70 commit: cfbab37b3da094579b8f7492e4df8a8a4c8c41b0 [8772/9113] selftests/net: Add TCP-AO library compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231219/202312190645.q76MmHyq-lkp@xxxxxxxxx/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 <lkp@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202312190645.q76MmHyq-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): In file included from lib/kconfig.c:6: >> lib/aolib.h:320:45: warning: 'struct tcp_ao_add' declared inside parameter list will not be visible outside of this definition or declaration 320 | extern int test_prepare_key_sockaddr(struct tcp_ao_add *ao, const char *alg, | ^~~~~~~~~~ lib/aolib.h:326:43: warning: 'struct tcp_ao_add' declared inside parameter list will not be visible outside of this definition or declaration 326 | static inline int test_prepare_key(struct tcp_ao_add *ao, | ^~~~~~~~~~ lib/aolib.h: In function 'test_prepare_key': >> lib/aolib.h:336:42: warning: passing argument 1 of 'test_prepare_key_sockaddr' from incompatible pointer type [-Wincompatible-pointer-types] 336 | return test_prepare_key_sockaddr(ao, alg, (void *)&addr, sizeof(addr), | ^~ | | | struct tcp_ao_add * lib/aolib.h:320:57: note: expected 'struct tcp_ao_add *' but argument is of type 'struct tcp_ao_add *' 320 | extern int test_prepare_key_sockaddr(struct tcp_ao_add *ao, const char *alg, | ~~~~~~~~~~~~~~~~~~~^~ lib/aolib.h: At top level: lib/aolib.h:341:47: warning: 'struct tcp_ao_add' declared inside parameter list will not be visible outside of this definition or declaration 341 | static inline int test_prepare_def_key(struct tcp_ao_add *ao, | ^~~~~~~~~~ lib/aolib.h: In function 'test_prepare_def_key': >> lib/aolib.h:349:33: warning: passing argument 1 of 'test_prepare_key' from incompatible pointer type [-Wincompatible-pointer-types] 349 | return test_prepare_key(ao, DEFAULT_TEST_ALGO, in_addr, false, false, | ^~ | | | struct tcp_ao_add * lib/aolib.h:326:55: note: expected 'struct tcp_ao_add *' but argument is of type 'struct tcp_ao_add *' 326 | static inline int test_prepare_key(struct tcp_ao_add *ao, | ~~~~~~~~~~~~~~~~~~~^~ lib/aolib.h: At top level: >> lib/aolib.h:354:43: warning: 'struct tcp_ao_getsockopt' declared inside parameter list will not be visible outside of this definition or declaration 354 | extern int test_get_one_ao(int sk, struct tcp_ao_getsockopt *out, | ^~~~~~~~~~~~~~~~~ >> lib/aolib.h:357:44: warning: 'struct tcp_ao_info_opt' declared inside parameter list will not be visible outside of this definition or declaration 357 | extern int test_get_ao_info(int sk, struct tcp_ao_info_opt *out); | ^~~~~~~~~~~~~~~ lib/aolib.h:358:44: warning: 'struct tcp_ao_info_opt' declared inside parameter list will not be visible outside of this definition or declaration 358 | extern int test_set_ao_info(int sk, struct tcp_ao_info_opt *in); | ^~~~~~~~~~~~~~~ lib/aolib.h:360:56: warning: 'struct tcp_ao_getsockopt' declared inside parameter list will not be visible outside of this definition or declaration 360 | const struct tcp_ao_getsockopt *b); | ^~~~~~~~~~~~~~~~~ lib/aolib.h:359:56: warning: 'struct tcp_ao_add' declared inside parameter list will not be visible outside of this definition or declaration 359 | extern int test_cmp_getsockopt_setsockopt(const struct tcp_ao_add *a, | ^~~~~~~~~~ lib/aolib.h:361:59: warning: 'struct tcp_ao_info_opt' declared inside parameter list will not be visible outside of this definition or declaration 361 | extern int test_cmp_getsockopt_setsockopt_ao(const struct tcp_ao_info_opt *a, | ^~~~~~~~~~~~~~~ lib/aolib.h:364:57: warning: 'struct tcp_ao_add' declared inside parameter list will not be visible outside of this definition or declaration 364 | static inline int test_verify_socket_key(int sk, struct tcp_ao_add *key) | ^~~~~~~~~~ lib/aolib.h: In function 'test_verify_socket_key': lib/aolib.h:366:16: error: variable 'key2' has initializer but incomplete type 366 | struct tcp_ao_getsockopt key2 = {}; | ^~~~~~~~~~~~~~~~~ lib/aolib.h:366:34: error: storage size of 'key2' isn't known 366 | struct tcp_ao_getsockopt key2 = {}; | ^~~~ lib/aolib.h:369:46: error: invalid use of undefined type 'struct tcp_ao_add' 369 | err = test_get_one_ao(sk, &key2, &key->addr, sizeof(key->addr), | ^~ lib/aolib.h:369:64: error: invalid use of undefined type 'struct tcp_ao_add' 369 | err = test_get_one_ao(sk, &key2, &key->addr, sizeof(key->addr), | ^~ lib/aolib.h:370:34: error: invalid use of undefined type 'struct tcp_ao_add' 370 | key->prefix, key->sndid, key->rcvid); | ^~ lib/aolib.h:370:47: error: invalid use of undefined type 'struct tcp_ao_add' 370 | key->prefix, key->sndid, key->rcvid); | ^~ lib/aolib.h:370:59: error: invalid use of undefined type 'struct tcp_ao_add' 370 | key->prefix, key->sndid, key->rcvid); | ^~ >> lib/aolib.h:374:47: warning: passing argument 1 of 'test_cmp_getsockopt_setsockopt' from incompatible pointer type [-Wincompatible-pointer-types] 374 | return test_cmp_getsockopt_setsockopt(key, &key2); | ^~~ | | | struct tcp_ao_add * lib/aolib.h:359:68: note: expected 'const struct tcp_ao_add *' but argument is of type 'struct tcp_ao_add *' 359 | extern int test_cmp_getsockopt_setsockopt(const struct tcp_ao_add *a, | ~~~~~~~~~~~~~~~~~~~~~~~~~^ >> lib/aolib.h:366:34: warning: unused variable 'key2' [-Wunused-variable] 366 | struct tcp_ao_getsockopt key2 = {}; | ^~~~ lib/aolib.h: In function 'test_add_key_vrf': lib/aolib.h:382:16: error: variable 'tmp' has initializer but incomplete type 382 | struct tcp_ao_add tmp = {}; | ^~~~~~~~~~ lib/aolib.h:382:27: error: storage size of 'tmp' isn't known 382 | struct tcp_ao_add tmp = {}; | ^~~ lib/aolib.h:390:43: error: 'TCP_AO_ADD_KEY' undeclared (first use in this function) 390 | err = setsockopt(sk, IPPROTO_TCP, TCP_AO_ADD_KEY, &tmp, sizeof(tmp)); | ^~~~~~~~~~~~~~ lib/aolib.h:390:43: note: each undeclared identifier is reported only once for each function it appears in >> lib/aolib.h:382:27: warning: unused variable 'tmp' [-Wunused-variable] 382 | struct tcp_ao_add tmp = {}; | ^~~ lib/aolib.h: At top level: lib/aolib.h:404:56: warning: 'struct tcp_ao_info_opt' declared inside parameter list will not be visible outside of this definition or declaration 404 | static inline int test_verify_socket_ao(int sk, struct tcp_ao_info_opt *ao) | ^~~~~~~~~~~~~~~ lib/aolib.h: In function 'test_verify_socket_ao': lib/aolib.h:406:16: error: variable 'ao2' has initializer but incomplete type 406 | struct tcp_ao_info_opt ao2 = {}; | ^~~~~~~~~~~~~~~ lib/aolib.h:406:32: error: storage size of 'ao2' isn't known 406 | struct tcp_ao_info_opt ao2 = {}; | ^~~ >> lib/aolib.h:413:50: warning: passing argument 1 of 'test_cmp_getsockopt_setsockopt_ao' from incompatible pointer type [-Wincompatible-pointer-types] 413 | return test_cmp_getsockopt_setsockopt_ao(ao, &ao2); | ^~ | | | struct tcp_ao_info_opt * lib/aolib.h:361:76: note: expected 'const struct tcp_ao_info_opt *' but argument is of type 'struct tcp_ao_info_opt *' 361 | extern int test_cmp_getsockopt_setsockopt_ao(const struct tcp_ao_info_opt *a, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >> lib/aolib.h:406:32: warning: unused variable 'ao2' [-Wunused-variable] 406 | struct tcp_ao_info_opt ao2 = {}; | ^~~ lib/aolib.h: In function 'test_set_ao_flags': lib/aolib.h:418:16: error: variable 'ao' has initializer but incomplete type 418 | struct tcp_ao_info_opt ao = {}; | ^~~~~~~~~~~~~~~ lib/aolib.h:418:32: error: storage size of 'ao' isn't known 418 | struct tcp_ao_info_opt ao = {}; | ^~ >> lib/aolib.h:418:32: warning: unused variable 'ao' [-Wunused-variable] lib/aolib.h: At top level: >> lib/aolib.h:565:47: warning: 'struct tcp_ao_repair' declared inside parameter list will not be visible outside of this definition or declaration 565 | extern void test_ao_checkpoint(int sk, struct tcp_ao_repair *state); | ^~~~~~~~~~~~~ lib/aolib.h:579:44: warning: 'struct tcp_ao_repair' declared inside parameter list will not be visible outside of this definition or declaration 579 | extern void test_ao_restore(int sk, struct tcp_ao_repair *state); | ^~~~~~~~~~~~~ lib/aolib.h: In function 'test_add_repaired_key': lib/aolib.h:589:16: error: variable 'tmp' has initializer but incomplete type 589 | struct tcp_ao_add tmp = {}; | ^~~~~~~~~~ lib/aolib.h:589:27: error: storage size of 'tmp' isn't known 589 | struct tcp_ao_add tmp = {}; | ^~~ lib/aolib.h:599:41: error: 'TCP_AO_ADD_KEY' undeclared (first use in this function) 599 | if (setsockopt(sk, IPPROTO_TCP, TCP_AO_ADD_KEY, &tmp, sizeof(tmp)) < 0) | ^~~~~~~~~~~~~~ lib/aolib.h:589:27: warning: unused variable 'tmp' [-Wunused-variable] 589 | struct tcp_ao_add tmp = {}; | ^~~ lib/kconfig.c: In function 'has_tcp_ao': lib/kconfig.c:47:16: error: variable 'tmp' has initializer but incomplete type 47 | struct tcp_ao_add tmp = {}; | ^~~~~~~~~~ lib/kconfig.c:47:27: error: storage size of 'tmp' isn't known 47 | struct tcp_ao_add tmp = {}; | ^~~ lib/kconfig.c:64:41: error: 'TCP_AO_ADD_KEY' undeclared (first use in this function) 64 | if (setsockopt(sk, IPPROTO_TCP, TCP_AO_ADD_KEY, &tmp, sizeof(tmp)) < 0) { | ^~~~~~~~~~~~~~ >> lib/kconfig.c:47:27: warning: unused variable 'tmp' [-Wunused-variable] 47 | struct tcp_ao_add tmp = {}; | ^~~ -- In file included from lib/netlink.c:12: >> lib/aolib.h:320:45: warning: 'struct tcp_ao_add' declared inside parameter list will not be visible outside of this definition or declaration 320 | extern int test_prepare_key_sockaddr(struct tcp_ao_add *ao, const char *alg, | ^~~~~~~~~~ lib/aolib.h:326:43: warning: 'struct tcp_ao_add' declared inside parameter list will not be visible outside of this definition or declaration 326 | static inline int test_prepare_key(struct tcp_ao_add *ao, | ^~~~~~~~~~ lib/aolib.h: In function 'test_prepare_key': >> lib/aolib.h:336:42: warning: passing argument 1 of 'test_prepare_key_sockaddr' from incompatible pointer type [-Wincompatible-pointer-types] 336 | return test_prepare_key_sockaddr(ao, alg, (void *)&addr, sizeof(addr), | ^~ | | | struct tcp_ao_add * lib/aolib.h:320:57: note: expected 'struct tcp_ao_add *' but argument is of type 'struct tcp_ao_add *' 320 | extern int test_prepare_key_sockaddr(struct tcp_ao_add *ao, const char *alg, | ~~~~~~~~~~~~~~~~~~~^~ lib/aolib.h: At top level: lib/aolib.h:341:47: warning: 'struct tcp_ao_add' declared inside parameter list will not be visible outside of this definition or declaration 341 | static inline int test_prepare_def_key(struct tcp_ao_add *ao, | ^~~~~~~~~~ lib/aolib.h: In function 'test_prepare_def_key': >> lib/aolib.h:349:33: warning: passing argument 1 of 'test_prepare_key' from incompatible pointer type [-Wincompatible-pointer-types] 349 | return test_prepare_key(ao, DEFAULT_TEST_ALGO, in_addr, false, false, | ^~ | | | struct tcp_ao_add * lib/aolib.h:326:55: note: expected 'struct tcp_ao_add *' but argument is of type 'struct tcp_ao_add *' 326 | static inline int test_prepare_key(struct tcp_ao_add *ao, | ~~~~~~~~~~~~~~~~~~~^~ lib/aolib.h: At top level: >> lib/aolib.h:354:43: warning: 'struct tcp_ao_getsockopt' declared inside parameter list will not be visible outside of this definition or declaration 354 | extern int test_get_one_ao(int sk, struct tcp_ao_getsockopt *out, | ^~~~~~~~~~~~~~~~~ >> lib/aolib.h:357:44: warning: 'struct tcp_ao_info_opt' declared inside parameter list will not be visible outside of this definition or declaration 357 | extern int test_get_ao_info(int sk, struct tcp_ao_info_opt *out); | ^~~~~~~~~~~~~~~ lib/aolib.h:358:44: warning: 'struct tcp_ao_info_opt' declared inside parameter list will not be visible outside of this definition or declaration 358 | extern int test_set_ao_info(int sk, struct tcp_ao_info_opt *in); | ^~~~~~~~~~~~~~~ lib/aolib.h:360:56: warning: 'struct tcp_ao_getsockopt' declared inside parameter list will not be visible outside of this definition or declaration 360 | const struct tcp_ao_getsockopt *b); | ^~~~~~~~~~~~~~~~~ lib/aolib.h:359:56: warning: 'struct tcp_ao_add' declared inside parameter list will not be visible outside of this definition or declaration 359 | extern int test_cmp_getsockopt_setsockopt(const struct tcp_ao_add *a, | ^~~~~~~~~~ lib/aolib.h:361:59: warning: 'struct tcp_ao_info_opt' declared inside parameter list will not be visible outside of this definition or declaration 361 | extern int test_cmp_getsockopt_setsockopt_ao(const struct tcp_ao_info_opt *a, | ^~~~~~~~~~~~~~~ lib/aolib.h:364:57: warning: 'struct tcp_ao_add' declared inside parameter list will not be visible outside of this definition or declaration 364 | static inline int test_verify_socket_key(int sk, struct tcp_ao_add *key) | ^~~~~~~~~~ lib/aolib.h: In function 'test_verify_socket_key': lib/aolib.h:366:16: error: variable 'key2' has initializer but incomplete type 366 | struct tcp_ao_getsockopt key2 = {}; | ^~~~~~~~~~~~~~~~~ lib/aolib.h:366:34: error: storage size of 'key2' isn't known 366 | struct tcp_ao_getsockopt key2 = {}; | ^~~~ lib/aolib.h:369:46: error: invalid use of undefined type 'struct tcp_ao_add' 369 | err = test_get_one_ao(sk, &key2, &key->addr, sizeof(key->addr), | ^~ lib/aolib.h:369:64: error: invalid use of undefined type 'struct tcp_ao_add' 369 | err = test_get_one_ao(sk, &key2, &key->addr, sizeof(key->addr), | ^~ lib/aolib.h:370:34: error: invalid use of undefined type 'struct tcp_ao_add' 370 | key->prefix, key->sndid, key->rcvid); | ^~ lib/aolib.h:370:47: error: invalid use of undefined type 'struct tcp_ao_add' 370 | key->prefix, key->sndid, key->rcvid); | ^~ lib/aolib.h:370:59: error: invalid use of undefined type 'struct tcp_ao_add' 370 | key->prefix, key->sndid, key->rcvid); | ^~ >> lib/aolib.h:374:47: warning: passing argument 1 of 'test_cmp_getsockopt_setsockopt' from incompatible pointer type [-Wincompatible-pointer-types] 374 | return test_cmp_getsockopt_setsockopt(key, &key2); | ^~~ | | | struct tcp_ao_add * lib/aolib.h:359:68: note: expected 'const struct tcp_ao_add *' but argument is of type 'struct tcp_ao_add *' 359 | extern int test_cmp_getsockopt_setsockopt(const struct tcp_ao_add *a, | ~~~~~~~~~~~~~~~~~~~~~~~~~^ >> lib/aolib.h:366:34: warning: unused variable 'key2' [-Wunused-variable] 366 | struct tcp_ao_getsockopt key2 = {}; | ^~~~ lib/aolib.h: In function 'test_add_key_vrf': lib/aolib.h:382:16: error: variable 'tmp' has initializer but incomplete type 382 | struct tcp_ao_add tmp = {}; | ^~~~~~~~~~ lib/aolib.h:382:27: error: storage size of 'tmp' isn't known 382 | struct tcp_ao_add tmp = {}; | ^~~ lib/aolib.h:390:43: error: 'TCP_AO_ADD_KEY' undeclared (first use in this function) 390 | err = setsockopt(sk, IPPROTO_TCP, TCP_AO_ADD_KEY, &tmp, sizeof(tmp)); | ^~~~~~~~~~~~~~ lib/aolib.h:390:43: note: each undeclared identifier is reported only once for each function it appears in >> lib/aolib.h:382:27: warning: unused variable 'tmp' [-Wunused-variable] 382 | struct tcp_ao_add tmp = {}; | ^~~ lib/aolib.h: At top level: lib/aolib.h:404:56: warning: 'struct tcp_ao_info_opt' declared inside parameter list will not be visible outside of this definition or declaration 404 | static inline int test_verify_socket_ao(int sk, struct tcp_ao_info_opt *ao) | ^~~~~~~~~~~~~~~ lib/aolib.h: In function 'test_verify_socket_ao': lib/aolib.h:406:16: error: variable 'ao2' has initializer but incomplete type 406 | struct tcp_ao_info_opt ao2 = {}; | ^~~~~~~~~~~~~~~ lib/aolib.h:406:32: error: storage size of 'ao2' isn't known 406 | struct tcp_ao_info_opt ao2 = {}; | ^~~ >> lib/aolib.h:413:50: warning: passing argument 1 of 'test_cmp_getsockopt_setsockopt_ao' from incompatible pointer type [-Wincompatible-pointer-types] 413 | return test_cmp_getsockopt_setsockopt_ao(ao, &ao2); | ^~ | | | struct tcp_ao_info_opt * lib/aolib.h:361:76: note: expected 'const struct tcp_ao_info_opt *' but argument is of type 'struct tcp_ao_info_opt *' 361 | extern int test_cmp_getsockopt_setsockopt_ao(const struct tcp_ao_info_opt *a, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >> lib/aolib.h:406:32: warning: unused variable 'ao2' [-Wunused-variable] 406 | struct tcp_ao_info_opt ao2 = {}; | ^~~ lib/aolib.h: In function 'test_set_ao_flags': lib/aolib.h:418:16: error: variable 'ao' has initializer but incomplete type 418 | struct tcp_ao_info_opt ao = {}; | ^~~~~~~~~~~~~~~ lib/aolib.h:418:32: error: storage size of 'ao' isn't known 418 | struct tcp_ao_info_opt ao = {}; | ^~ >> lib/aolib.h:418:32: warning: unused variable 'ao' [-Wunused-variable] lib/aolib.h: At top level: >> lib/aolib.h:565:47: warning: 'struct tcp_ao_repair' declared inside parameter list will not be visible outside of this definition or declaration 565 | extern void test_ao_checkpoint(int sk, struct tcp_ao_repair *state); | ^~~~~~~~~~~~~ lib/aolib.h:579:44: warning: 'struct tcp_ao_repair' declared inside parameter list will not be visible outside of this definition or declaration 579 | extern void test_ao_restore(int sk, struct tcp_ao_repair *state); | ^~~~~~~~~~~~~ lib/aolib.h: In function 'test_add_repaired_key': lib/aolib.h:589:16: error: variable 'tmp' has initializer but incomplete type 589 | struct tcp_ao_add tmp = {}; | ^~~~~~~~~~ lib/aolib.h:589:27: error: storage size of 'tmp' isn't known 589 | struct tcp_ao_add tmp = {}; | ^~~ lib/aolib.h:599:41: error: 'TCP_AO_ADD_KEY' undeclared (first use in this function) 599 | if (setsockopt(sk, IPPROTO_TCP, TCP_AO_ADD_KEY, &tmp, sizeof(tmp)) < 0) | ^~~~~~~~~~~~~~ lib/aolib.h:589:27: warning: unused variable 'tmp' [-Wunused-variable] 589 | struct tcp_ao_add tmp = {}; | ^~~ .. -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki