Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

gcov: shut up missing prototype warnings for internal stubs

gcov uses global functions that are called from generated code, but these
have no prototype in a header, which causes a W=1 build warning:

kernel/gcov/gcc_base.c:12:6: error: no previous prototype for '__gcov_init' [-Werror=missing-prototypes]
kernel/gcov/gcc_base.c:40:6: error: no previous prototype for '__gcov_flush' [-Werror=missing-prototypes]
kernel/gcov/gcc_base.c:46:6: error: no previous prototype for '__gcov_merge_add' [-Werror=missing-prototypes]
kernel/gcov/gcc_base.c:52:6: error: no previous prototype for '__gcov_merge_single' [-Werror=missing-prototypes]

Just turn off these warnings unconditionally for the two files that
contain them.

Link: https://lore.kernel.org/all/0820010f-e9dc-779d-7924-49c7df446bce@linux.ibm.com/
Link: https://lkml.kernel.org/r/20230725123042.2269077-1-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Acked-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Arnd Bergmann and committed by
Andrew Morton
29665c1e a53fb69b

+2
+2
kernel/gcov/Makefile
··· 3 3 4 4 obj-y := base.o fs.o 5 5 obj-$(CONFIG_CC_IS_GCC) += gcc_base.o gcc_4_7.o 6 + CFLAGS_gcc_base.o += -Wno-missing-prototypes -Wno-missing-declarations 6 7 obj-$(CONFIG_CC_IS_CLANG) += clang.o 8 + CFLAGS_clang.o += -Wno-missing-prototypes -Wno-missing-declarations