aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Idle.cxx3
-rw-r--r--src/SongLoader.cxx3
-rw-r--r--src/db/plugins/simple/SimpleDatabasePlugin.cxx5
-rw-r--r--src/fs/Traits.hxx16
-rw-r--r--src/lib/icu/Collate.cxx6
5 files changed, 32 insertions, 1 deletions
diff --git a/src/Idle.cxx b/src/Idle.cxx
index 8fe672200..0b66065de 100644
--- a/src/Idle.cxx
+++ b/src/Idle.cxx
@@ -76,7 +76,10 @@ idle_get_names(void)
unsigned
idle_parse_name(const char *name)
{
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
assert(name != nullptr);
+#endif
for (unsigned i = 0; idle_names[i] != nullptr; ++i)
if (StringEqualsCaseASCII(name, idle_names[i]))
diff --git a/src/SongLoader.cxx b/src/SongLoader.cxx
index c766a16a9..43e57e93b 100644
--- a/src/SongLoader.cxx
+++ b/src/SongLoader.cxx
@@ -77,7 +77,10 @@ SongLoader::LoadFile(const char *path_utf8, Error &error) const
DetachedSong *
SongLoader::LoadSong(const char *uri_utf8, Error &error) const
{
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
assert(uri_utf8 != nullptr);
+#endif
if (memcmp(uri_utf8, "file:///", 8) == 0)
/* absolute path */
diff --git a/src/db/plugins/simple/SimpleDatabasePlugin.cxx b/src/db/plugins/simple/SimpleDatabasePlugin.cxx
index 7b1886f1c..a0472462a 100644
--- a/src/db/plugins/simple/SimpleDatabasePlugin.cxx
+++ b/src/db/plugins/simple/SimpleDatabasePlugin.cxx
@@ -435,9 +435,12 @@ SimpleDatabase::Save(Error &error)
bool
SimpleDatabase::Mount(const char *uri, Database *db, Error &error)
{
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
assert(uri != nullptr);
- assert(*uri != 0);
assert(db != nullptr);
+#endif
+ assert(*uri != 0);
ScopeDatabaseLock protect;
diff --git a/src/fs/Traits.hxx b/src/fs/Traits.hxx
index 77317e1ee..1af8f8672 100644
--- a/src/fs/Traits.hxx
+++ b/src/fs/Traits.hxx
@@ -57,7 +57,11 @@ struct PathTraitsFS {
gcc_pure gcc_nonnull_all
static const_pointer FindLastSeparator(const_pointer p) {
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
assert(p != nullptr);
+#endif
+
#ifdef WIN32
const_pointer pos = p + GetLength(p);
while (p != pos && !IsSeparator(*pos))
@@ -77,7 +81,11 @@ struct PathTraitsFS {
gcc_pure gcc_nonnull_all
static bool IsAbsolute(const_pointer p) {
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
assert(p != nullptr);
+#endif
+
#ifdef WIN32
if (IsDrive(p) && IsSeparator(p[2]))
return true;
@@ -147,7 +155,11 @@ struct PathTraitsUTF8 {
gcc_pure gcc_nonnull_all
static const_pointer FindLastSeparator(const_pointer p) {
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
assert(p != nullptr);
+#endif
+
return strrchr(p, SEPARATOR);
}
@@ -160,7 +172,11 @@ struct PathTraitsUTF8 {
gcc_pure gcc_nonnull_all
static bool IsAbsolute(const_pointer p) {
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
assert(p != nullptr);
+#endif
+
#ifdef WIN32
if (IsDrive(p) && IsSeparator(p[2]))
return true;
diff --git a/src/lib/icu/Collate.cxx b/src/lib/icu/Collate.cxx
index b8560a4d8..17b536b37 100644
--- a/src/lib/icu/Collate.cxx
+++ b/src/lib/icu/Collate.cxx
@@ -121,8 +121,11 @@ gcc_pure
int
IcuCollate(const char *a, const char *b)
{
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
assert(a != nullptr);
assert(b != nullptr);
+#endif
#ifdef HAVE_ICU
assert(collator != nullptr);
@@ -159,7 +162,10 @@ IcuCaseFold(const char *src)
{
#ifdef HAVE_ICU
assert(collator != nullptr);
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
assert(src != nullptr);
+#endif
const auto u = UCharFromUTF8(src);
if (u.IsNull())