aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/plugins/simple
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
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')
-rw-r--r--src/db/plugins/simple/SimpleDatabasePlugin.cxx11
-rw-r--r--src/db/plugins/simple/SimpleDatabasePlugin.hxx6
2 files changed, 10 insertions, 7 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);
diff --git a/src/db/plugins/simple/SimpleDatabasePlugin.hxx b/src/db/plugins/simple/SimpleDatabasePlugin.hxx
index eb225b2c8..dec2a3a7c 100644
--- a/src/db/plugins/simple/SimpleDatabasePlugin.hxx
+++ b/src/db/plugins/simple/SimpleDatabasePlugin.hxx
@@ -110,9 +110,9 @@ public:
virtual bool Open(Error &error) override;
virtual void Close() override;
- virtual const LightSong *GetSong(const char *uri_utf8,
- Error &error) const override;
- virtual void ReturnSong(const LightSong *song) const;
+ const LightSong *GetSong(const char *uri_utf8,
+ Error &error) const override;
+ void ReturnSong(const LightSong *song) const override;
virtual bool Visit(const DatabaseSelection &selection,
VisitDirectory visit_directory,