util/{ASCII,UriUtil}, ...: work around -Wtautological-pointer-compare

New in clang 3.6.
This commit is contained in:
Max Kellermann
2014-12-26 13:40:17 +01:00
parent a5049136ff
commit 53f4044890
11 changed files with 52 additions and 0 deletions

View File

@@ -77,7 +77,10 @@ TagBuilder::Commit()
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);
char *p = FixTagString(value, length);
@@ -98,7 +101,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;
@@ -109,7 +115,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));
}