aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS5
-rw-r--r--doc/user.xml10
-rw-r--r--src/Compiler.h7
-rw-r--r--src/Idle.cxx3
-rw-r--r--src/SongFilter.cxx3
-rw-r--r--src/SongLoader.cxx3
-rw-r--r--src/db/plugins/LazyDatabase.hxx2
-rw-r--r--src/db/plugins/ProxyDatabasePlugin.cxx8
-rw-r--r--src/db/plugins/simple/SimpleDatabasePlugin.cxx11
-rw-r--r--src/db/plugins/simple/SimpleDatabasePlugin.hxx6
-rw-r--r--src/db/plugins/upnp/UpnpDatabasePlugin.cxx6
-rw-r--r--src/decoder/DecoderPlugin.cxx6
-rw-r--r--src/decoder/plugins/FfmpegDecoderPlugin.cxx1
-rw-r--r--src/filter/plugins/ChainFilterPlugin.cxx9
-rw-r--r--src/filter/plugins/NormalizeFilterPlugin.cxx9
-rw-r--r--src/filter/plugins/ReplayGainFilterPlugin.cxx9
-rw-r--r--src/filter/plugins/RouteFilterPlugin.cxx9
-rw-r--r--src/filter/plugins/VolumeFilterPlugin.cxx9
-rw-r--r--src/fs/Charset.cxx6
-rw-r--r--src/fs/Traits.cxx6
-rw-r--r--src/fs/Traits.hxx16
-rw-r--r--src/input/InputStream.cxx3
-rw-r--r--src/input/plugins/MmsInputPlugin.cxx2
-rw-r--r--src/lib/icu/Collate.cxx6
-rw-r--r--src/output/plugins/ShoutOutputPlugin.cxx2
-rw-r--r--src/pcm/FormatConverter.cxx2
-rw-r--r--src/storage/plugins/NfsStorage.cxx2
-rw-r--r--src/tag/TagBuilder.cxx9
-rw-r--r--src/util/ASCII.hxx26
-rw-r--r--src/util/UriUtil.cxx3
30 files changed, 147 insertions, 52 deletions
diff --git a/NEWS b/NEWS
index 835775766..c675aef18 100644
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,8 @@ ver 0.19.8 (not yet released)
- mms: reduce delay at the beginning of playback
* decoder
- dsdiff, dsf: allow ID3 tags larger than 4 kB
+ - ffmpeg: support interleaved floating point
+* fix clang 3.6 warnings
ver 0.19.7 (2014/12/17)
* input
@@ -188,6 +190,9 @@ ver 0.19 (2014/10/10)
* install systemd unit for socket activation
* Android port
+ver 0.18.22 (not yet released)
+* fix clang 3.6 warnings
+
ver 0.18.21 (2014/12/17)
* playlist
- embcue: fix filename suffix detection
diff --git a/doc/user.xml b/doc/user.xml
index e76bbfc1b..e5b89e27d 100644
--- a/doc/user.xml
+++ b/doc/user.xml
@@ -89,7 +89,7 @@ cd mpd-version</programlisting>
</para>
<programlisting>
-apt-get install g++ automake autoconf \
+apt-get install g++ \
libmad0-dev libmpg123-dev libid3tag0-dev \
libflac-dev libvorbis-dev libopus-dev \
libadplug-dev libaudiofile-dev libsndfile1-dev libfaad-dev \
@@ -98,19 +98,21 @@ apt-get install g++ automake autoconf \
libsidplay2-dev libsidutils-dev libresid-builder-dev \
libavcodec-dev libavformat-dev \
libmp3lame-dev \
- libsamplerate0-dev \
+ libsamplerate0-dev libsoxr-dev \
libbz2-dev libcdio-paranoia-dev libiso9660-dev libmms-dev \
libzzip-dev \
- libcurl4-gnutls-dev libyajl-dev \
+ libcurl4-gnutls-dev libyajl-dev libexpat-dev \
libasound2-dev libao-dev libjack-jackd2-dev libopenal-dev \
libpulse-dev libroar-dev libshout3-dev \
libmpdclient-dev \
+ libnfs-dev libsmbclient-dev \
+ libupnp-dev \
libavahi-client-dev \
libsqlite3-dev \
libsystemd-daemon-dev libwrap0-dev \
libcppunit-dev xmlto \
libboost-dev \
- libglib2.0-dev
+ libglib2.0-dev libicu-dev
</programlisting>
<para>
diff --git a/src/Compiler.h b/src/Compiler.h
index 3b4e9c8dc..dc3de5af9 100644
--- a/src/Compiler.h
+++ b/src/Compiler.h
@@ -64,6 +64,13 @@
# warning Untested compiler. Use at your own risk!
#endif
+/**
+ * Are we building with the specified version of clang or newer?
+ */
+#define CLANG_CHECK_VERSION(major, minor) \
+ (defined(__clang__) && \
+ CLANG_VERSION >= GCC_MAKE_VERSION(major, minor, 0))
+
#if CLANG_OR_GCC_VERSION(4,0)
/* GCC 4.x */
diff --git a/src/Idle.cxx b/src/Idle.cxx
index 8fe672200..0b66065de 100644
--- a/src/Idle.cxx
+++ b/src/Idle.cxx
@@ -76,7 +76,10 @@ idle_get_names(void)
unsigned
idle_parse_name(const char *name)
{
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
assert(name != nullptr);
+#endif
for (unsigned i = 0; idle_names[i] != nullptr; ++i)
if (StringEqualsCaseASCII(name, idle_names[i]))
diff --git a/src/SongFilter.cxx b/src/SongFilter.cxx
index 794cb9208..dc0a63df3 100644
--- a/src/SongFilter.cxx
+++ b/src/SongFilter.cxx
@@ -77,7 +77,10 @@ SongFilter::Item::Item(unsigned _tag, time_t _time)
bool
SongFilter::Item::StringMatch(const char *s) const
{
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
assert(s != nullptr);
+#endif
if (fold_case) {
const std::string folded = IcuCaseFold(s);
diff --git a/src/SongLoader.cxx b/src/SongLoader.cxx
index c766a16a9..43e57e93b 100644
--- a/src/SongLoader.cxx
+++ b/src/SongLoader.cxx
@@ -77,7 +77,10 @@ SongLoader::LoadFile(const char *path_utf8, Error &error) const
DetachedSong *
SongLoader::LoadSong(const char *uri_utf8, Error &error) const
{
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
assert(uri_utf8 != nullptr);
+#endif
if (memcmp(uri_utf8, "file:///", 8) == 0)
/* absolute path */
diff --git a/src/db/plugins/LazyDatabase.hxx b/src/db/plugins/LazyDatabase.hxx
index ae1b961d0..38b3fdc2a 100644
--- a/src/db/plugins/LazyDatabase.hxx
+++ b/src/db/plugins/LazyDatabase.hxx
@@ -43,7 +43,7 @@ public:
virtual const LightSong *GetSong(const char *uri_utf8,
Error &error) const override;
- virtual void ReturnSong(const LightSong *song) const;
+ void ReturnSong(const LightSong *song) const override;
virtual bool Visit(const DatabaseSelection &selection,
VisitDirectory visit_directory,
diff --git a/src/db/plugins/ProxyDatabasePlugin.cxx b/src/db/plugins/ProxyDatabasePlugin.cxx
index fba72210d..5fd224bb5 100644
--- a/src/db/plugins/ProxyDatabasePlugin.cxx
+++ b/src/db/plugins/ProxyDatabasePlugin.cxx
@@ -103,7 +103,7 @@ public:
virtual void Close() override;
virtual const LightSong *GetSong(const char *uri_utf8,
Error &error) const override;
- virtual void ReturnSong(const LightSong *song) const;
+ void ReturnSong(const LightSong *song) const override;
virtual bool Visit(const DatabaseSelection &selection,
VisitDirectory visit_directory,
@@ -731,7 +731,7 @@ ProxyDatabase::Visit(const DatabaseSelection &selection,
{
// TODO: eliminate the const_cast
if (!const_cast<ProxyDatabase *>(this)->EnsureConnected(error))
- return nullptr;
+ return false;
if (!visit_directory && !visit_playlist && selection.recursive &&
(ServerSupportsSearchBase(connection)
@@ -757,7 +757,7 @@ ProxyDatabase::VisitUniqueTags(const DatabaseSelection &selection,
{
// TODO: eliminate the const_cast
if (!const_cast<ProxyDatabase *>(this)->EnsureConnected(error))
- return nullptr;
+ return false;
enum mpd_tag_type tag_type2 = Convert(tag_type);
if (tag_type2 == MPD_TAG_COUNT) {
@@ -810,7 +810,7 @@ ProxyDatabase::GetStats(const DatabaseSelection &selection,
// TODO: eliminate the const_cast
if (!const_cast<ProxyDatabase *>(this)->EnsureConnected(error))
- return nullptr;
+ return false;
struct mpd_stats *stats2 =
mpd_run_stats(connection);
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,
diff --git a/src/db/plugins/upnp/UpnpDatabasePlugin.cxx b/src/db/plugins/upnp/UpnpDatabasePlugin.cxx
index 8d7f1bda8..aea97aa8e 100644
--- a/src/db/plugins/upnp/UpnpDatabasePlugin.cxx
+++ b/src/db/plugins/upnp/UpnpDatabasePlugin.cxx
@@ -85,7 +85,7 @@ public:
virtual void Close() override;
virtual const LightSong *GetSong(const char *uri_utf8,
Error &error) const override;
- virtual void ReturnSong(const LightSong *song) const;
+ void ReturnSong(const LightSong *song) const override;
virtual bool Visit(const DatabaseSelection &selection,
VisitDirectory visit_directory,
@@ -101,7 +101,9 @@ public:
virtual bool GetStats(const DatabaseSelection &selection,
DatabaseStats &stats,
Error &error) const override;
- virtual time_t GetUpdateStamp() const {return 0;}
+ time_t GetUpdateStamp() const override {
+ return 0;
+ }
protected:
bool Configure(const config_param &param, Error &error);
diff --git a/src/decoder/DecoderPlugin.cxx b/src/decoder/DecoderPlugin.cxx
index 3be812c3b..a0722c348 100644
--- a/src/decoder/DecoderPlugin.cxx
+++ b/src/decoder/DecoderPlugin.cxx
@@ -26,7 +26,10 @@
bool
DecoderPlugin::SupportsSuffix(const char *suffix) const
{
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
assert(suffix != nullptr);
+#endif
return suffixes != nullptr && string_array_contains(suffixes, suffix);
@@ -35,7 +38,10 @@ DecoderPlugin::SupportsSuffix(const char *suffix) const
bool
DecoderPlugin::SupportsMimeType(const char *mime_type) const
{
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
assert(mime_type != nullptr);
+#endif
return mime_types != nullptr &&
string_array_contains(mime_types, mime_type);
diff --git a/src/decoder/plugins/FfmpegDecoderPlugin.cxx b/src/decoder/plugins/FfmpegDecoderPlugin.cxx
index eee8f2e93..85e852fb4 100644
--- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx
+++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx
@@ -232,6 +232,7 @@ ffmpeg_sample_format(enum AVSampleFormat sample_fmt)
case AV_SAMPLE_FMT_S32P:
return SampleFormat::S32;
+ case AV_SAMPLE_FMT_FLT:
case AV_SAMPLE_FMT_FLTP:
return SampleFormat::FLOAT;
diff --git a/src/filter/plugins/ChainFilterPlugin.cxx b/src/filter/plugins/ChainFilterPlugin.cxx
index 7342beb14..4aeee69af 100644
--- a/src/filter/plugins/ChainFilterPlugin.cxx
+++ b/src/filter/plugins/ChainFilterPlugin.cxx
@@ -53,10 +53,11 @@ public:
children.emplace_back(name, filter);
}
- virtual AudioFormat Open(AudioFormat &af, Error &error) override;
- virtual void Close();
- virtual ConstBuffer<void> FilterPCM(ConstBuffer<void> src,
- Error &error);
+ /* virtual methods from class Filter */
+ AudioFormat Open(AudioFormat &af, Error &error) override;
+ void Close() override;
+ ConstBuffer<void> FilterPCM(ConstBuffer<void> src,
+ Error &error) override;
private:
/**
diff --git a/src/filter/plugins/NormalizeFilterPlugin.cxx b/src/filter/plugins/NormalizeFilterPlugin.cxx
index a69df2b81..372ab53ac 100644
--- a/src/filter/plugins/NormalizeFilterPlugin.cxx
+++ b/src/filter/plugins/NormalizeFilterPlugin.cxx
@@ -34,10 +34,11 @@ class NormalizeFilter final : public Filter {
PcmBuffer buffer;
public:
- virtual AudioFormat Open(AudioFormat &af, Error &error) override;
- virtual void Close();
- virtual ConstBuffer<void> FilterPCM(ConstBuffer<void> src,
- Error &error) override;
+ /* virtual methods from class Filter */
+ AudioFormat Open(AudioFormat &af, Error &error) override;
+ void Close() override;
+ ConstBuffer<void> FilterPCM(ConstBuffer<void> src,
+ Error &error) override;
};
static Filter *
diff --git a/src/filter/plugins/ReplayGainFilterPlugin.cxx b/src/filter/plugins/ReplayGainFilterPlugin.cxx
index 651352ac9..f76e48e37 100644
--- a/src/filter/plugins/ReplayGainFilterPlugin.cxx
+++ b/src/filter/plugins/ReplayGainFilterPlugin.cxx
@@ -112,10 +112,11 @@ public:
*/
void Update();
- virtual AudioFormat Open(AudioFormat &af, Error &error) override;
- virtual void Close();
- virtual ConstBuffer<void> FilterPCM(ConstBuffer<void> src,
- Error &error) override;
+ /* virtual methods from class Filter */
+ AudioFormat Open(AudioFormat &af, Error &error) override;
+ void Close() override;
+ ConstBuffer<void> FilterPCM(ConstBuffer<void> src,
+ Error &error) override;
};
void
diff --git a/src/filter/plugins/RouteFilterPlugin.cxx b/src/filter/plugins/RouteFilterPlugin.cxx
index a252af97d..4094119f2 100644
--- a/src/filter/plugins/RouteFilterPlugin.cxx
+++ b/src/filter/plugins/RouteFilterPlugin.cxx
@@ -120,10 +120,11 @@ public:
*/
bool Configure(const config_param &param, Error &error);
- virtual AudioFormat Open(AudioFormat &af, Error &error) override;
- virtual void Close();
- virtual ConstBuffer<void> FilterPCM(ConstBuffer<void> src,
- Error &error) override;
+ /* virtual methods from class Filter */
+ AudioFormat Open(AudioFormat &af, Error &error) override;
+ void Close() override;
+ ConstBuffer<void> FilterPCM(ConstBuffer<void> src,
+ Error &error) override;
};
bool
diff --git a/src/filter/plugins/VolumeFilterPlugin.cxx b/src/filter/plugins/VolumeFilterPlugin.cxx
index 7b6ccc51e..17e061476 100644
--- a/src/filter/plugins/VolumeFilterPlugin.cxx
+++ b/src/filter/plugins/VolumeFilterPlugin.cxx
@@ -43,10 +43,11 @@ public:
pv.SetVolume(_volume);
}
- virtual AudioFormat Open(AudioFormat &af, Error &error) override;
- virtual void Close();
- virtual ConstBuffer<void> FilterPCM(ConstBuffer<void> src,
- Error &error) override;
+ /* virtual methods from class Filter */
+ AudioFormat Open(AudioFormat &af, Error &error) override;
+ void Close() override;
+ ConstBuffer<void> FilterPCM(ConstBuffer<void> src,
+ Error &error) override;
};
static constexpr Domain volume_domain("pcm_volume");
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;
diff --git a/src/input/InputStream.cxx b/src/input/InputStream.cxx
index f5efe8ef1..44f726a62 100644
--- a/src/input/InputStream.cxx
+++ b/src/input/InputStream.cxx
@@ -122,7 +122,10 @@ InputStream::IsAvailable()
size_t
InputStream::LockRead(void *ptr, size_t _size, Error &error)
{
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
assert(ptr != nullptr);
+#endif
assert(_size > 0);
const ScopeLock protect(mutex);
diff --git a/src/input/plugins/MmsInputPlugin.cxx b/src/input/plugins/MmsInputPlugin.cxx
index df291bc84..d01cff3b3 100644
--- a/src/input/plugins/MmsInputPlugin.cxx
+++ b/src/input/plugins/MmsInputPlugin.cxx
@@ -43,7 +43,7 @@ protected:
virtual size_t ThreadRead(void *ptr, size_t size,
Error &error) override;
- virtual void Close() {
+ void Close() override {
mmsx_close(mms);
}
};
diff --git a/src/lib/icu/Collate.cxx b/src/lib/icu/Collate.cxx
index 1dde5d5e2..f2ffb7b74 100644
--- a/src/lib/icu/Collate.cxx
+++ b/src/lib/icu/Collate.cxx
@@ -78,8 +78,11 @@ gcc_pure
int
IcuCollate(const char *a, const char *b)
{
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
assert(a != nullptr);
assert(b != nullptr);
+#endif
#ifdef HAVE_ICU
assert(collator != nullptr);
@@ -116,7 +119,10 @@ IcuCaseFold(const char *src)
{
#ifdef HAVE_ICU
assert(collator != nullptr);
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
assert(src != nullptr);
+#endif
const auto u = UCharFromUTF8(src);
if (u.IsNull())
diff --git a/src/output/plugins/ShoutOutputPlugin.cxx b/src/output/plugins/ShoutOutputPlugin.cxx
index 0341e1cf7..b51f7ed82 100644
--- a/src/output/plugins/ShoutOutputPlugin.cxx
+++ b/src/output/plugins/ShoutOutputPlugin.cxx
@@ -109,7 +109,7 @@ ShoutOutput::Configure(const config_param &param, Error &error)
if (!audio_format.IsFullyDefined()) {
error.Set(config_domain,
"Need full audio format specification");
- return nullptr;
+ return false;
}
const char *host = require_block_string(param, "host");
diff --git a/src/pcm/FormatConverter.cxx b/src/pcm/FormatConverter.cxx
index b058b32f5..8874e1b3c 100644
--- a/src/pcm/FormatConverter.cxx
+++ b/src/pcm/FormatConverter.cxx
@@ -44,7 +44,7 @@ PcmFormatConverter::Open(SampleFormat _src_format, SampleFormat _dest_format,
"PCM conversion from %s to %s is not implemented",
sample_format_to_string(_src_format),
sample_format_to_string(_dest_format));
- return nullptr;
+ return false;
case SampleFormat::S16:
case SampleFormat::S24_P32:
diff --git a/src/storage/plugins/NfsStorage.cxx b/src/storage/plugins/NfsStorage.cxx
index 823d662c5..324b40b6f 100644
--- a/src/storage/plugins/NfsStorage.cxx
+++ b/src/storage/plugins/NfsStorage.cxx
@@ -288,7 +288,7 @@ NfsStorage::GetInfo(const char *uri_utf8, gcc_unused bool follow,
return false;
if (!WaitConnected(error))
- return nullptr;
+ return false;
NfsGetInfoOperation operation(*connection, path.c_str(), info);
return operation.Run(error);
diff --git a/src/tag/TagBuilder.cxx b/src/tag/TagBuilder.cxx
index c9ebcd654..93518f6e9 100644
--- a/src/tag/TagBuilder.cxx
+++ b/src/tag/TagBuilder.cxx
@@ -182,7 +182,10 @@ TagBuilder::Complement(const Tag &other)
inline void
TagBuilder::AddItemInternal(TagType type, const char *value, size_t length)
{
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
assert(value != nullptr);
+#endif
assert(length > 0);
auto f = FixTagString(value, length);
@@ -203,7 +206,10 @@ TagBuilder::AddItemInternal(TagType type, const char *value, size_t length)
void
TagBuilder::AddItem(TagType type, const char *value, size_t length)
{
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
assert(value != nullptr);
+#endif
if (length == 0 || ignore_tag_items[type])
return;
@@ -214,7 +220,10 @@ TagBuilder::AddItem(TagType type, const char *value, size_t length)
void
TagBuilder::AddItem(TagType type, const char *value)
{
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
assert(value != nullptr);
+#endif
AddItem(type, value, strlen(value));
}
diff --git a/src/util/ASCII.hxx b/src/util/ASCII.hxx
index 19a18a1bb..9f7147338 100644
--- a/src/util/ASCII.hxx
+++ b/src/util/ASCII.hxx
@@ -43,24 +43,30 @@ gcc_pure gcc_nonnull_all
static inline bool
StringEqualsCaseASCII(const char *a, const char *b)
{
- assert(a != nullptr);
- assert(b != nullptr);
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
+ assert(a != nullptr);
+ assert(b != nullptr);
+#endif
- /* note: strcasecmp() depends on the locale, but for ASCII-only
- strings, it's safe to use */
- return strcasecmp(a, b) == 0;
+ /* note: strcasecmp() depends on the locale, but for ASCII-only
+ strings, it's safe to use */
+ return strcasecmp(a, b) == 0;
}
gcc_pure gcc_nonnull_all
static inline bool
StringEqualsCaseASCII(const char *a, const char *b, size_t n)
{
- assert(a != nullptr);
- assert(b != nullptr);
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
+ assert(a != nullptr);
+ assert(b != nullptr);
+#endif
- /* note: strcasecmp() depends on the locale, but for ASCII-only
- strings, it's safe to use */
- return strncasecmp(a, b, n) == 0;
+ /* note: strcasecmp() depends on the locale, but for ASCII-only
+ strings, it's safe to use */
+ return strncasecmp(a, b, n) == 0;
}
#endif
diff --git a/src/util/UriUtil.cxx b/src/util/UriUtil.cxx
index 62977e91b..54d0ded77 100644
--- a/src/util/UriUtil.cxx
+++ b/src/util/UriUtil.cxx
@@ -140,8 +140,11 @@ uri_remove_auth(const char *uri)
bool
uri_is_child(const char *parent, const char *child)
{
+#if !CLANG_CHECK_VERSION(3,6)
+ /* disabled on clang due to -Wtautological-pointer-compare */
assert(parent != nullptr);
assert(child != nullptr);
+#endif
const size_t parent_length = strlen(parent);
return memcmp(parent, child, parent_length) == 0 &&