Hi Arnd, On Wed, Aug 9, 2023 at 11:11 PM Arnd Bergmann <arnd@xxxxxxxxxx> wrote:
From: Arnd Bergmann <arnd@xxxxxxxx> 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. As far as I understand the #define to redirect memcmp() to __builtin_memcmp() does not actually do anything here since this is what it does anyway.
I believe it does with -ffreestanding? So if you don't mind, I'd like to apply this with that sentence removed. x86 also still has that define in string_32.h. Andi dropped it for amd64 in commit 6edfba1b33c70110 ("[PATCH] x86_64: Don't define string functions to builtin") in v2.6.17.
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Reviewed-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> i.e. will queue in the m68k for-v6.6 branch, with the obvious typo fixed. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds