Skip to content

Commit 1a48e2c

Browse files
arndbgeertu
authored andcommitted
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>
1 parent 668a920 commit 1a48e2c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/m68k/include/asm/string.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ static inline char *strncpy(char *dest, const char *src, size_t n)
4141
#define __HAVE_ARCH_MEMMOVE
4242
extern void *memmove(void *, const void *, __kernel_size_t);
4343

44+
extern int memcmp(const void *, const void *, __kernel_size_t);
4445
#define memcmp(d, s, n) __builtin_memcmp(d, s, n)
4546

4647
#define __HAVE_ARCH_MEMSET

0 commit comments

Comments
 (0)