diff --git a/Makefile b/Makefile index 36cea50..1396525 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/loader_example.cc b/loader_example.cc index a1cdb2a..8e2262e 100644 --- a/loader_example.cc +++ b/loader_example.cc @@ -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 << ", "; } diff --git a/tiny_gltf.h b/tiny_gltf.h index 0594a30..4f1e3db 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -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;