diff options
Diffstat (limited to 'src/util/ASCII.hxx')
-rw-r--r-- | src/util/ASCII.hxx | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/util/ASCII.hxx b/src/util/ASCII.hxx index 19a18a1bb..9f7147338 100644 --- a/src/util/ASCII.hxx +++ b/src/util/ASCII.hxx @@ -43,24 +43,30 @@ gcc_pure gcc_nonnull_all static inline bool StringEqualsCaseASCII(const char *a, const char *b) { - assert(a != nullptr); - assert(b != nullptr); +#if !CLANG_CHECK_VERSION(3,6) + /* disabled on clang due to -Wtautological-pointer-compare */ + assert(a != nullptr); + assert(b != nullptr); +#endif - /* note: strcasecmp() depends on the locale, but for ASCII-only - strings, it's safe to use */ - return strcasecmp(a, b) == 0; + /* note: strcasecmp() depends on the locale, but for ASCII-only + strings, it's safe to use */ + return strcasecmp(a, b) == 0; } gcc_pure gcc_nonnull_all static inline bool StringEqualsCaseASCII(const char *a, const char *b, size_t n) { - assert(a != nullptr); - assert(b != nullptr); +#if !CLANG_CHECK_VERSION(3,6) + /* disabled on clang due to -Wtautological-pointer-compare */ + assert(a != nullptr); + assert(b != nullptr); +#endif - /* note: strcasecmp() depends on the locale, but for ASCII-only - strings, it's safe to use */ - return strncasecmp(a, b, n) == 0; + /* note: strcasecmp() depends on the locale, but for ASCII-only + strings, it's safe to use */ + return strncasecmp(a, b, n) == 0; } #endif |