aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/plugins/simple
diff options
context:
space:
mode:
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,