Suppress clang warnings.

This commit is contained in:
Syoyo Fujita 2018-04-15 18:40:55 +09:00
parent c89fc5f06b
commit 48f6db0994
3 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
# Use this for strict compilation check(will work on clang 3.8+)
#EXTRA_CXXFLAGS := -fsanitize=address -Wall -Werror -Weverything -Wno-c++11-long-long
#EXTRA_CXXFLAGS := -fsanitize=address -Wall -Werror -Weverything -Wno-c++11-long-long -Wno-c++98-compat
all:
clang++ $(EXTRA_CXXFLAGS) -std=c++11 -g -O0 -o loader_example loader_example.cc

View File

@ -262,7 +262,7 @@ static std::string PrintValue(const std::string &name,
} else if (value.IsArray()) {
ss << Indent(indent) << name << " [ ";
for (size_t i = 0; i < value.Size(); i++) {
ss << PrintValue("", value.Get(i), indent + 1, /* tag */false);
ss << PrintValue("", value.Get(int(i)), indent + 1, /* tag */false);
if (i != (value.ArrayLen()-1)) {
ss << ", ";
}

View File

@ -1610,7 +1610,7 @@ static bool ParseJsonAsValue(Value* ret, const json &o)
break;
case json::value_t::null:
case json::value_t::discarded:
default:
//default:
break;
}
if (ret)
@ -1905,6 +1905,8 @@ static bool ParseParameterProperty(Parameter *param, std::string *err,
static bool ParseExtensionsProperty(ExtensionMap *ret, std::string* err, const json &o)
{
(void)err;
json::const_iterator it = o.find("extensions");
if (it == o.end()) {
return false;