fix(assimp): -Wunused-but-set-variable error from GCC 16#4
Closed
c-dilks wants to merge 1 commit into
Closed
Conversation
GCC 16 is out now and it's much more aggressive for warning on
`-Wunused-but-set-variable`; one particular warning from building
`assimp` as part of `cadmesh` is:
```
/tmp/mlibrary/cadmesh/external/assimp/code/AssetLib/MS3D/MS3DLoader.cpp: In member function ‘virtual void Assimp::MS3DImporter::InternReadFile(const std::string&, aiScene*, Assimp::IOSystem*)’:
/tmp/mlibrary/cadmesh/external/assimp/code/AssetLib/MS3D/MS3DLoader.cpp:633:28: error: variable ‘qu’ set but not used [-Werror=unused-but-set-variable=]
633 | aiQuatKey* qu = nd->mRotationKeys;
| ^~
cc1plus: all warnings being treated as errors
```
The `assimp` project builds with `-Werror`, which treats all warnings as
errors, so this warning causes compilation failure of `cadmesh`.
This PR builds `assimp` with `-Wunused-but-set-variable` to suppress
this error.
Contributor
Author
|
Hmm... this isn't the only one that would need suppressing... |
Contributor
Author
|
Nevermind, #5 is sufficient if you install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GCC 16 is out now and it's much more aggressive for warning on
-Wunused-but-set-variable; one particular warning from buildingassimpas part ofcadmeshis:The
assimpproject builds with-Werror, which treats all warnings as errors, so this warning causes compilation failure ofcadmesh.This PR builds
assimpwith-Wunused-but-set-variableto suppress this error.