aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/ASCII.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-12-26 14:40:32 +0100
committerMax Kellermann <max@duempel.org>2014-12-26 14:40:32 +0100
commit412bedb697c66c809652510951e1ccdb5319d0bb (patch)
treea9c94234d7078e7a1e694e65db70a65966ccb5ac /src/util/ASCII.hxx
parentd37811f177bb7e4c5dd6e3a18b3466ba831aa379 (diff)
parent163597ef6939e4250afafe12f821aa732b1fc2b7 (diff)
downloadmpd-412bedb697c66c809652510951e1ccdb5319d0bb.tar.gz
mpd-412bedb697c66c809652510951e1ccdb5319d0bb.tar.xz
mpd-412bedb697c66c809652510951e1ccdb5319d0bb.zip
Merge branch 'v0.19.x'
Diffstat (limited to 'src/util/ASCII.hxx')
-rw-r--r--src/util/ASCII.hxx26
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