From 0d2b6efa6f934945e0171f153e6a08c4a4a88906 Mon Sep 17 00:00:00 2001 From: jrkoonce <30676875+jrkoonce@users.noreply.github.com> Date: Wed, 4 Sep 2019 13:46:45 -0500 Subject: [PATCH] Removing warnings --- tiny_gltf.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tiny_gltf.h b/tiny_gltf.h index 2b2bba2..90b8572 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -882,7 +882,7 @@ struct Accessor { return static_cast(bufferViewObject.byteStride); } - return 0; + //unreachable return 0; } Accessor() { @@ -3090,7 +3090,7 @@ static bool ParseBooleanProperty(bool *ret, std::string *err, const json &o, auto& value = GetValue(it); bool isBoolean; - bool boolValue; + bool boolValue = false; #ifdef TINYGLTF_USE_RAPIDJSON isBoolean = value.IsBool(); if (isBoolean) @@ -3176,7 +3176,7 @@ static bool ParseUnsignedProperty(size_t *ret, std::string *err, const json &o, auto& value = GetValue(it); - size_t uValue; + size_t uValue = 0; bool isUValue; #ifdef TINYGLTF_USE_RAPIDJSON isUValue = false; @@ -5031,9 +5031,9 @@ bool TinyGLTF::LoadFromString(Model *model, std::string *err, std::string *warn, auto ForEachInArray = [](const json& v, const char* member, const std::function& cb)->bool #endif { - json_const_iterator it; - if (FindMember(v, member, it) && IsArray(GetValue(it))) { - const json &root = GetValue(it); + json_const_iterator itm; + if (FindMember(v, member, itm) && IsArray(GetValue(itm))) { + const json &root = GetValue(itm); auto it = ArrayBegin(root); auto end = ArrayEnd(root); for (; it != end; ++it) {