From a8e7c2360508060234aca824d65b692a3d303624 Mon Sep 17 00:00:00 2001 From: Jackie9527 <80555200+Jackie9527@users.noreply.github.com> Date: Sat, 29 Apr 2023 00:29:33 +0800 Subject: [PATCH 1/5] Fix warning related to unreachable-code. Signed-off-by: Jackie9527 <80555200+Jackie9527@users.noreply.github.com> --- code/AssetLib/FBX/FBXParser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/AssetLib/FBX/FBXParser.cpp b/code/AssetLib/FBX/FBXParser.cpp index 150921db5..11cd1a934 100644 --- a/code/AssetLib/FBX/FBXParser.cpp +++ b/code/AssetLib/FBX/FBXParser.cpp @@ -190,7 +190,7 @@ Scope::Scope(Parser& parser,bool topLevel) } auto *element = new_Element(*n, parser); - + // Element() should stop at the next Key token (or right after a Close token) n = parser.CurrentToken(); if (n == nullptr) { @@ -198,8 +198,8 @@ Scope::Scope(Parser& parser,bool topLevel) elements.insert(ElementMap::value_type(str, element)); return; } - ParseError("unexpected end of file",parser.LastToken()); delete element; + ParseError("unexpected end of file",parser.LastToken()); } else { elements.insert(ElementMap::value_type(str, element)); } From cabf3a5d17be1479dd2b1a9d64eff7bc9f557501 Mon Sep 17 00:00:00 2001 From: Jackie9527 <80555200+Jackie9527@users.noreply.github.com> Date: Sat, 29 Apr 2023 00:30:21 +0800 Subject: [PATCH 2/5] Fix warning related to unreachable-code-return. Signed-off-by: Jackie9527 <80555200+Jackie9527@users.noreply.github.com> --- code/AssetLib/X3D/X3DXmlHelper.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/code/AssetLib/X3D/X3DXmlHelper.cpp b/code/AssetLib/X3D/X3DXmlHelper.cpp index ff24b74b3..7ed2e8237 100644 --- a/code/AssetLib/X3D/X3DXmlHelper.cpp +++ b/code/AssetLib/X3D/X3DXmlHelper.cpp @@ -12,7 +12,6 @@ bool X3DXmlHelper::getColor3DAttribute(XmlNode &node, const char *attributeName, tokenize(val, values, " "); if (values.size() != 3) { Throw_ConvertFail_Str2ArrF(node.name(), attributeName); - return false; } auto it = values.begin(); color.r = stof(*it++); @@ -30,7 +29,6 @@ bool X3DXmlHelper::getVector2DAttribute(XmlNode &node, const char *attributeName tokenize(val, values, " "); if (values.size() != 2) { Throw_ConvertFail_Str2ArrF(node.name(), attributeName); - return false; } auto it = values.begin(); color.x = stof(*it++); @@ -47,7 +45,6 @@ bool X3DXmlHelper::getVector3DAttribute(XmlNode &node, const char *attributeName tokenize(val, values, " "); if (values.size() != 3) { Throw_ConvertFail_Str2ArrF(node.name(), attributeName); - return false; } auto it = values.begin(); color.x = stof(*it++); From cdefc9f7aa5ff59618df60cfa505c6ac180e0115 Mon Sep 17 00:00:00 2001 From: Jackie9527 <80555200+Jackie9527@users.noreply.github.com> Date: Sat, 29 Apr 2023 00:43:40 +0800 Subject: [PATCH 3/5] Remove unused -Wno-deprecated-copy-with-dtor. Signed-off-by: Jackie9527 <80555200+Jackie9527@users.noreply.github.com> --- code/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index d5500d986..cf86225d9 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -1241,7 +1241,6 @@ IF (ASSIMP_WARNINGS_AS_ERRORS) -Wno-undefined-reinterpret-cast -Wno-shift-sign-overflow -Wno-deprecated-copy-with-user-provided-dtor - -Wno-deprecated-copy-with-dtor -Wno-deprecated -Wno-format-nonliteral -Wno-comma From 51494e1b4fec3d9086aa4a45332f46d103aa7ddc Mon Sep 17 00:00:00 2001 From: Jackie9527 <80555200+Jackie9527@users.noreply.github.com> Date: Sat, 29 Apr 2023 00:55:13 +0800 Subject: [PATCH 4/5] Remove unused -Wno-deprecated-copy-with-user-provided-dtor. Signed-off-by: Jackie9527 <80555200+Jackie9527@users.noreply.github.com> --- code/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index cf86225d9..af260f5e9 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -1240,7 +1240,6 @@ IF (ASSIMP_WARNINGS_AS_ERRORS) -Wno-nonportable-system-include-path -Wno-undefined-reinterpret-cast -Wno-shift-sign-overflow - -Wno-deprecated-copy-with-user-provided-dtor -Wno-deprecated -Wno-format-nonliteral -Wno-comma From 92d426de2b6878ee5f8535d8ad5c51f871b632df Mon Sep 17 00:00:00 2001 From: Jackie9527 <80555200+Jackie9527@users.noreply.github.com> Date: Sat, 29 Apr 2023 01:05:25 +0800 Subject: [PATCH 5/5] Remove unused -Wno-missing-noreturn. Signed-off-by: Jackie9527 <80555200+Jackie9527@users.noreply.github.com> --- code/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index af260f5e9..02ba7a08e 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -1234,7 +1234,6 @@ IF (ASSIMP_WARNINGS_AS_ERRORS) -Wno-header-hygiene -Wno-tautological-value-range-compare -Wno-tautological-type-limit-compare - -Wno-missing-noreturn -Wno-missing-variable-declarations -Wno-extra-semi -Wno-nonportable-system-include-path