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

m68k: Add memcmp() declaration

There is a global definition of memcmp() that gets built on m68k but is
never used and causes a warning because of the missing prototype:

lib/string.c:671:15: error: no previous prototype for 'memcmp' [-Werror=missing-prototypes]

Add the corresponding declaration to avoid the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/20230809211057.60514-2-arnd@kernel.org
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

authored by

Arnd Bergmann and committed by
Geert Uytterhoeven
1a48e2cc 668a9202

+1
+1
arch/m68k/include/asm/string.h
··· 41 41 #define __HAVE_ARCH_MEMMOVE 42 42 extern void *memmove(void *, const void *, __kernel_size_t); 43 43 44 + extern int memcmp(const void *, const void *, __kernel_size_t); 44 45 #define memcmp(d, s, n) __builtin_memcmp(d, s, n) 45 46 46 47 #define __HAVE_ARCH_MEMSET