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: <20160810215424.1926658-10-arnd@arndb.de>
Date:	Wed, 10 Aug 2016 23:54:15 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	George Spelvin <linux@...encehorizons.net>
Cc:	Arnd Bergmann <arnd@...db.de>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	linux-kernel@...r.kernel.org
Subject: [PATCH 9/9] test/hash: Fix warning in preprocessor symbol evaluation

From: George Spelvin <linux@...encehorizons.net>

Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> Some versions of gcc don't like tests for the value of an undefined
> preprocessor symbol, even in the #else branch of an #ifndef:

Damn, I had hoped that would work universally; I tried to avoid the
uglier #if-inside-#ifdef construction.  GCC 6 is quite happy wth it.

But no objections.

If you want:
Acked-by: George Spelvin <linux@...encehorizons.net>

But here's an alternative.  Geert, what do you think of this?
Acked-by: George Spelvin <linux@...encehorizons.net>

Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 lib/test_hash.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/test_hash.c b/lib/test_hash.c
index 81702ee4c41c..ddd819fec343 100644
--- a/lib/test_hash.c
+++ b/lib/test_hash.c
@@ -221,17 +221,17 @@ test_hash_init(void)
 	/* Issue notices about skipped tests. */
 #ifndef HAVE_ARCH__HASH_32
 	pr_info("__hash_32() has no arch implementation to test.");
-#elif HAVE_ARCH__HASH_32 != 1
+#elif HAVE_ARCH__HASH_32 + 0 != 1
 	pr_info("__hash_32() is arch-specific; not compared to generic.");
 #endif
 #ifndef HAVE_ARCH_HASH_32
 	pr_info("hash_32() has no arch implementation to test.");
-#elif HAVE_ARCH_HASH_32 != 1
+#elif HAVE_ARCH_HASH_32  + 0 != 1
 	pr_info("hash_32() is arch-specific; not compared to generic.");
 #endif
 #ifndef HAVE_ARCH_HASH_64
 	pr_info("hash_64() has no arch implementation to test.");
-#elif HAVE_ARCH_HASH_64 != 1
+#elif HAVE_ARCH_HASH_64 + 0 != 1
 	pr_info("hash_64() is arch-specific; not compared to generic.");
 #endif
 
-- 
2.9.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ