aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/plugins/simple/SimpleDatabasePlugin.cxx
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/db/plugins/simple/SimpleDatabasePlugin.cxx
parentd37811f177bb7e4c5dd6e3a18b3466ba831aa379 (diff)
parent163597ef6939e4250afafe12f821aa732b1fc2b7 (diff)
downloadmpd-412bedb697c66c809652510951e1ccdb5319d0bb.tar.gz
mpd-412bedb697c66c809652510951e1ccdb5319d0bb.tar.xz
mpd-412bedb697c66c809652510951e1ccdb5319d0bb.zip
Merge branch 'v0.19.x'
Diffstat (limited to 'src/db/plugins/simple/SimpleDatabasePlugin.cxx')
-rw-r--r--src/db/plugins/simple/SimpleDatabasePlugin.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/db/plugins/simple/SimpleDatabasePlugin.cxx b/src/db/plugins/simple/SimpleDatabasePlugin.cxx
index bc9c42d2d..00eb078bc 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;
@@ -445,13 +448,13 @@ SimpleDatabase::Mount(const char *uri, Database *db, Error &error)
if (r.uri == nullptr) {
error.Format(db_domain, DB_CONFLICT,
"Already exists: %s", uri);
- return nullptr;
+ return false;
}
if (strchr(r.uri, '/') != nullptr) {
error.Format(db_domain, DB_NOT_FOUND,
"Parent not found: %s", uri);
- return nullptr;
+ return false;
}
Directory *mnt = r.directory->CreateChild(r.uri);
@@ -478,7 +481,7 @@ SimpleDatabase::Mount(const char *local_uri, const char *storage_uri,
if (cache_path.IsNull()) {
error.Format(db_domain, DB_NOT_FOUND,
"No 'cache_directory' configured");
- return nullptr;
+ return false;
}
std::string name(storage_uri);