]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Fix XXH_HAS_C_ATTRIBUTE check
authoreasyaspi314 (Devin) <easyaspi314@users.noreply.github.com>
Mon, 13 Dec 2021 20:08:50 +0000 (15:08 -0500)
committerMatteo Croce <teknoraver@meta.com>
Mon, 7 Apr 2025 13:09:08 +0000 (15:09 +0200)
include/xxhash.h

index fbd1aab9aca03eff09f65e19a10003953c58bbba..c17521f99f37b426be80dc656e77ac7ddbd65a03 100644 (file)
@@ -631,14 +631,12 @@ introduced in CPP17 and C23.
 CPP17 : https://en.cppreference.com/w/cpp/language/attributes/fallthrough
 C23   : https://en.cppreference.com/w/c/language/attributes/fallthrough
 */
-#if XXH_HAS_C_ATTRIBUTE(x)
-# define XXH_FALLTHROUGH [[fallthrough]]
-#elif XXH_HAS_CPP_ATTRIBUTE(x)
+#if XXH_HAS_C_ATTRIBUTE(fallthrough) || XXH_HAS_CPP_ATTRIBUTE(fallthrough)
 # define XXH_FALLTHROUGH [[fallthrough]]
 #elif XXH_HAS_ATTRIBUTE(__fallthrough__)
-# define XXH_FALLTHROUGH __attribute__ ((fallthrough))
+# define XXH_FALLTHROUGH __attribute__ ((__fallthrough__))
 #else
-# define XXH_FALLTHROUGH
+# define XXH_FALLTHROUGH /* fallthrough */
 #endif
 
 /*!