diff options
author | Max Kellermann <max@duempel.org> | 2014-12-26 13:40:17 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-12-26 13:43:32 +0100 |
commit | 53f40448901ffe0d953c81939d031c63cdf3779a (patch) | |
tree | 9007d66ae6b1a9b58efbff6fa8db80df0a206b13 /src/fs | |
parent | a5049136ffe020cd17109985e697fe2e8e1a18d5 (diff) |
util/{ASCII,UriUtil}, ...: work around -Wtautological-pointer-compare
New in clang 3.6.
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/Charset.cxx | 6 | ||||
-rw-r--r-- | src/fs/Traits.cxx | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/fs/Charset.cxx b/src/fs/Charset.cxx index dad5779f9..0b598ef46 100644 --- a/src/fs/Charset.cxx +++ b/src/fs/Charset.cxx @@ -79,7 +79,10 @@ GetFSCharset() std::string PathToUTF8(const char *path_fs) { +#if !CLANG_CHECK_VERSION(3,6) + /* disabled on clang due to -Wtautological-pointer-compare */ assert(path_fs != nullptr); +#endif if (fs_charset.empty()) return std::string(path_fs); @@ -109,7 +112,10 @@ PathToUTF8(const char *path_fs) char * PathFromUTF8(const char *path_utf8) { +#if !CLANG_CHECK_VERSION(3,6) + /* disabled on clang due to -Wtautological-pointer-compare */ assert(path_utf8 != nullptr); +#endif if (fs_charset.empty()) return g_strdup(path_utf8); diff --git a/src/fs/Traits.cxx b/src/fs/Traits.cxx index 2c3ce075b..47cb5aee3 100644 --- a/src/fs/Traits.cxx +++ b/src/fs/Traits.cxx @@ -25,7 +25,10 @@ const char * PathTraits::GetBaseUTF8(const char *p) { +#if !CLANG_CHECK_VERSION(3,6) + /* disabled on clang due to -Wtautological-pointer-compare */ assert(p != nullptr); +#endif const char *slash = strrchr(p, SEPARATOR_UTF8); return slash != nullptr @@ -36,7 +39,10 @@ PathTraits::GetBaseUTF8(const char *p) std::string PathTraits::GetParentUTF8(const char *p) { +#if !CLANG_CHECK_VERSION(3,6) + /* disabled on clang due to -Wtautological-pointer-compare */ assert(p != nullptr); +#endif const char *slash = strrchr(p, SEPARATOR_UTF8); return slash != nullptr |