aboutsummaryrefslogtreecommitdiffstats
path: root/src/fs
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/Charset.cxx6
-rw-r--r--src/fs/Traits.cxx6
-rw-r--r--src/fs/Traits.hxx16
3 files changed, 28 insertions, 0 deletions
diff --git a/src/fs/Charset.cxx b/src/fs/Charset.cxx
index 453962c1f..4d562b59f 100644
--- a/src/fs/Charset.cxx
+++ b/src/fs/Charset.cxx
@@ -89,7 +89,10 @@ static inline void FixSeparators(std::string &s)
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
#ifdef HAVE_FS_CHARSET
if (fs_converter == nullptr) {
@@ -111,7 +114,10 @@ PathToUTF8(const char *path_fs)
std::string
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_converter == nullptr)
return path_utf8;
diff --git a/src/fs/Traits.cxx b/src/fs/Traits.cxx
index d62987087..166b31f4e 100644
--- a/src/fs/Traits.cxx
+++ b/src/fs/Traits.cxx
@@ -52,7 +52,10 @@ template<typename Traits>
typename Traits::const_pointer
GetBasePathImpl(typename Traits::const_pointer p)
{
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
assert(p != nullptr);
+#endif
typename Traits::const_pointer sep = Traits::FindLastSeparator(p);
return sep != nullptr
@@ -64,7 +67,10 @@ template<typename Traits>
typename Traits::string
GetParentPathImpl(typename Traits::const_pointer p)
{
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
assert(p != nullptr);
+#endif
typename Traits::const_pointer sep = Traits::FindLastSeparator(p);
if (sep == nullptr)
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;