Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
95f84afd
Commit
95f84afd
authored
Dec 26, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fs/Traits, ...: work around -Wtautological-pointer-compare
New in clang 3.6.
parent
9f7fd1fb
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
1 deletion
+32
-1
Idle.cxx
src/Idle.cxx
+3
-0
SongLoader.cxx
src/SongLoader.cxx
+3
-0
SimpleDatabasePlugin.cxx
src/db/plugins/simple/SimpleDatabasePlugin.cxx
+4
-1
Traits.hxx
src/fs/Traits.hxx
+16
-0
Collate.cxx
src/lib/icu/Collate.cxx
+6
-0
No files found.
src/Idle.cxx
View file @
95f84afd
...
@@ -76,7 +76,10 @@ idle_get_names(void)
...
@@ -76,7 +76,10 @@ idle_get_names(void)
unsigned
unsigned
idle_parse_name
(
const
char
*
name
)
idle_parse_name
(
const
char
*
name
)
{
{
#if !CLANG_CHECK_VERSION(3,6)
/* disabled on clang due to -Wtautological-pointer-compare */
assert
(
name
!=
nullptr
);
assert
(
name
!=
nullptr
);
#endif
for
(
unsigned
i
=
0
;
idle_names
[
i
]
!=
nullptr
;
++
i
)
for
(
unsigned
i
=
0
;
idle_names
[
i
]
!=
nullptr
;
++
i
)
if
(
StringEqualsCaseASCII
(
name
,
idle_names
[
i
]))
if
(
StringEqualsCaseASCII
(
name
,
idle_names
[
i
]))
...
...
src/SongLoader.cxx
View file @
95f84afd
...
@@ -77,7 +77,10 @@ SongLoader::LoadFile(const char *path_utf8, Error &error) const
...
@@ -77,7 +77,10 @@ SongLoader::LoadFile(const char *path_utf8, Error &error) const
DetachedSong
*
DetachedSong
*
SongLoader
::
LoadSong
(
const
char
*
uri_utf8
,
Error
&
error
)
const
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
);
assert
(
uri_utf8
!=
nullptr
);
#endif
if
(
memcmp
(
uri_utf8
,
"file:///"
,
8
)
==
0
)
if
(
memcmp
(
uri_utf8
,
"file:///"
,
8
)
==
0
)
/* absolute path */
/* absolute path */
...
...
src/db/plugins/simple/SimpleDatabasePlugin.cxx
View file @
95f84afd
...
@@ -435,9 +435,12 @@ SimpleDatabase::Save(Error &error)
...
@@ -435,9 +435,12 @@ SimpleDatabase::Save(Error &error)
bool
bool
SimpleDatabase
::
Mount
(
const
char
*
uri
,
Database
*
db
,
Error
&
error
)
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
!=
nullptr
);
assert
(
*
uri
!=
0
);
assert
(
db
!=
nullptr
);
assert
(
db
!=
nullptr
);
#endif
assert
(
*
uri
!=
0
);
ScopeDatabaseLock
protect
;
ScopeDatabaseLock
protect
;
...
...
src/fs/Traits.hxx
View file @
95f84afd
...
@@ -57,7 +57,11 @@ struct PathTraitsFS {
...
@@ -57,7 +57,11 @@ struct PathTraitsFS {
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
static
const_pointer
FindLastSeparator
(
const_pointer
p
)
{
static
const_pointer
FindLastSeparator
(
const_pointer
p
)
{
#if !CLANG_CHECK_VERSION(3,6)
/* disabled on clang due to -Wtautological-pointer-compare */
assert
(
p
!=
nullptr
);
assert
(
p
!=
nullptr
);
#endif
#ifdef WIN32
#ifdef WIN32
const_pointer
pos
=
p
+
GetLength
(
p
);
const_pointer
pos
=
p
+
GetLength
(
p
);
while
(
p
!=
pos
&&
!
IsSeparator
(
*
pos
))
while
(
p
!=
pos
&&
!
IsSeparator
(
*
pos
))
...
@@ -77,7 +81,11 @@ struct PathTraitsFS {
...
@@ -77,7 +81,11 @@ struct PathTraitsFS {
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
static
bool
IsAbsolute
(
const_pointer
p
)
{
static
bool
IsAbsolute
(
const_pointer
p
)
{
#if !CLANG_CHECK_VERSION(3,6)
/* disabled on clang due to -Wtautological-pointer-compare */
assert
(
p
!=
nullptr
);
assert
(
p
!=
nullptr
);
#endif
#ifdef WIN32
#ifdef WIN32
if
(
IsDrive
(
p
)
&&
IsSeparator
(
p
[
2
]))
if
(
IsDrive
(
p
)
&&
IsSeparator
(
p
[
2
]))
return
true
;
return
true
;
...
@@ -147,7 +155,11 @@ struct PathTraitsUTF8 {
...
@@ -147,7 +155,11 @@ struct PathTraitsUTF8 {
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
static
const_pointer
FindLastSeparator
(
const_pointer
p
)
{
static
const_pointer
FindLastSeparator
(
const_pointer
p
)
{
#if !CLANG_CHECK_VERSION(3,6)
/* disabled on clang due to -Wtautological-pointer-compare */
assert
(
p
!=
nullptr
);
assert
(
p
!=
nullptr
);
#endif
return
strrchr
(
p
,
SEPARATOR
);
return
strrchr
(
p
,
SEPARATOR
);
}
}
...
@@ -160,7 +172,11 @@ struct PathTraitsUTF8 {
...
@@ -160,7 +172,11 @@ struct PathTraitsUTF8 {
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
static
bool
IsAbsolute
(
const_pointer
p
)
{
static
bool
IsAbsolute
(
const_pointer
p
)
{
#if !CLANG_CHECK_VERSION(3,6)
/* disabled on clang due to -Wtautological-pointer-compare */
assert
(
p
!=
nullptr
);
assert
(
p
!=
nullptr
);
#endif
#ifdef WIN32
#ifdef WIN32
if
(
IsDrive
(
p
)
&&
IsSeparator
(
p
[
2
]))
if
(
IsDrive
(
p
)
&&
IsSeparator
(
p
[
2
]))
return
true
;
return
true
;
...
...
src/lib/icu/Collate.cxx
View file @
95f84afd
...
@@ -121,8 +121,11 @@ gcc_pure
...
@@ -121,8 +121,11 @@ gcc_pure
int
int
IcuCollate
(
const
char
*
a
,
const
char
*
b
)
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
(
a
!=
nullptr
);
assert
(
b
!=
nullptr
);
assert
(
b
!=
nullptr
);
#endif
#ifdef HAVE_ICU
#ifdef HAVE_ICU
assert
(
collator
!=
nullptr
);
assert
(
collator
!=
nullptr
);
...
@@ -159,7 +162,10 @@ IcuCaseFold(const char *src)
...
@@ -159,7 +162,10 @@ IcuCaseFold(const char *src)
{
{
#ifdef HAVE_ICU
#ifdef HAVE_ICU
assert
(
collator
!=
nullptr
);
assert
(
collator
!=
nullptr
);
#if !CLANG_CHECK_VERSION(3,6)
/* disabled on clang due to -Wtautological-pointer-compare */
assert
(
src
!=
nullptr
);
assert
(
src
!=
nullptr
);
#endif
const
auto
u
=
UCharFromUTF8
(
src
);
const
auto
u
=
UCharFromUTF8
(
src
);
if
(
u
.
IsNull
())
if
(
u
.
IsNull
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment