lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230809211057.60514-2-arnd@kernel.org>
Date:   Wed,  9 Aug 2023 23:10:50 +0200
From:   Arnd Bergmann <arnd@...nel.org>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:     Arnd Bergmann <arnd@...db.de>, linux-m68k@...ts.linux-m68k.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] m68k: add memcmp() declarartion

From: Arnd Bergmann <arnd@...db.de>

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.

Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 arch/m68k/include/asm/string.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/m68k/include/asm/string.h b/arch/m68k/include/asm/string.h
index f0f5021d6327d..760cc13acdf41 100644
--- a/arch/m68k/include/asm/string.h
+++ b/arch/m68k/include/asm/string.h
@@ -41,6 +41,7 @@ static inline char *strncpy(char *dest, const char *src, size_t n)
 #define __HAVE_ARCH_MEMMOVE
 extern void *memmove(void *, const void *, __kernel_size_t);
 
+extern int memcmp(const void *, const void *, __kernel_size_t);
 #define memcmp(d, s, n) __builtin_memcmp(d, s, n)
 
 #define __HAVE_ARCH_MEMSET
-- 
2.39.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ