Merge pull request #5046 from Jackie9527/msvc-clang-unreachable-code-break

Fix warning related to unreachable-code-break.
pull/5047/head^2
Kim Kulling 2023-04-20 17:13:44 +02:00 committed by GitHub
commit 87a288ebd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 2 additions and 9 deletions

View File

@ -1855,7 +1855,6 @@ size_t ColladaParser::ReadPrimitives(XmlNode &node, Mesh &pMesh, std::vector<Inp
default: default:
// LineStrip is not supported due to expected index unmangling // LineStrip is not supported due to expected index unmangling
throw DeadlyImportError("Unsupported primitive type."); throw DeadlyImportError("Unsupported primitive type.");
break;
} }
// store the face size to later reconstruct the face from // store the face size to later reconstruct the face from

View File

@ -65,7 +65,6 @@ void LWOImporter::LoadLWOBFile()
if (mFileBuffer + head.length > end) if (mFileBuffer + head.length > end)
{ {
throw DeadlyImportError("LWOB: Invalid chunk length"); throw DeadlyImportError("LWOB: Invalid chunk length");
break;
} }
uint8_t* const next = mFileBuffer+head.length; uint8_t* const next = mFileBuffer+head.length;
switch (head.type) switch (head.type)

View File

@ -1486,7 +1486,6 @@ void LWOImporter::LoadLWO2File() {
if (mFileBuffer + head.length > end) { if (mFileBuffer + head.length > end) {
throw DeadlyImportError("LWO2: Chunk length points behind the file"); throw DeadlyImportError("LWO2: Chunk length points behind the file");
break;
} }
uint8_t *const next = mFileBuffer + head.length; uint8_t *const next = mFileBuffer + head.length;
mFileBuffer += bufOffset; mFileBuffer += bufOffset;

View File

@ -236,7 +236,7 @@ void ObjFileParser::parseFile(IOStreamBuffer<char> &streamBuffer) {
getNameNoSpace(m_DataIt, m_DataItEnd, name); getNameNoSpace(m_DataIt, m_DataItEnd, name);
insideCstype = name == "cstype"; insideCstype = name == "cstype";
goto pf_skip_line; goto pf_skip_line;
} break; }
default: { default: {
pf_skip_line: pf_skip_line:

View File

@ -382,11 +382,10 @@ void Q3DImporter::InternReadFile(const std::string &pFile,
// TODO // TODO
goto outer; goto outer;
} break; }
default: default:
throw DeadlyImportError("Quick3D: Unknown chunk"); throw DeadlyImportError("Quick3D: Unknown chunk");
break;
}; };
} }
outer: outer:

View File

@ -839,7 +839,6 @@ void XFileParser::ParseDataObjectAnimationKey(AnimBone *pAnimBone) {
default: default:
ThrowException("Unknown key type ", keyType, " in animation."); ThrowException("Unknown key type ", keyType, " in animation.");
break;
} // end switch } // end switch
// key separator // key separator

View File

@ -1246,7 +1246,6 @@ IF (ASSIMP_WARNINGS_AS_ERRORS)
-Wno-deprecated -Wno-deprecated
-Wno-format-nonliteral -Wno-format-nonliteral
-Wno-comma -Wno-comma
-Wno-unreachable-code-break
-Wno-implicit-fallthrough -Wno-implicit-fallthrough
-Wno-unused-template -Wno-unused-template
-Wno-undefined-func-template -Wno-undefined-func-template

View File

@ -290,7 +290,6 @@ void ValidateDSProcess::Validate(const aiMesh *pMesh) {
switch (face.mNumIndices) { switch (face.mNumIndices) {
case 0: case 0:
ReportError("aiMesh::mFaces[%i].mNumIndices is 0", i); ReportError("aiMesh::mFaces[%i].mNumIndices is 0", i);
break;
case 1: case 1:
if (0 == (pMesh->mPrimitiveTypes & aiPrimitiveType_POINT)) { if (0 == (pMesh->mPrimitiveTypes & aiPrimitiveType_POINT)) {
ReportError("aiMesh::mFaces[%i] is a POINT but aiMesh::mPrimitiveTypes " ReportError("aiMesh::mFaces[%i] is a POINT but aiMesh::mPrimitiveTypes "