Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix unused variable warnings under MSVC#2884

Merged
ahojnnes merged 1 commit intomainfrom
user/jsch/windows-reconstruction-exc-warning
Nov 4, 2024
Merged

Fix unused variable warnings under MSVC#2884
ahojnnes merged 1 commit intomainfrom
user/jsch/windows-reconstruction-exc-warning

Conversation

@ahojnnes
Copy link
Contributor

@ahojnnes ahojnnes commented Nov 4, 2024

Fixes the following warnings triggered on almost every file because of transitive includes:

colmap/scene/reconstruction.h(279): warning C4101: 'e': unreferenced local variable

Copy link
Member

@sarlinpe sarlinpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks! Shouldn't have this been caught by ClangTidy?

@ahojnnes
Copy link
Contributor Author

ahojnnes commented Nov 4, 2024

Nice, thanks! Shouldn't have this been caught by ClangTidy?

There may be no check implemented for this or we have not activated it. In theory, I agree, that this is something that it should be able to detect.

@ahojnnes ahojnnes merged commit 50918c8 into main Nov 4, 2024
@ahojnnes ahojnnes deleted the user/jsch/windows-reconstruction-exc-warning branch November 4, 2024 08:45
@sarlinpe
Copy link
Member

sarlinpe commented Nov 4, 2024

It's apparently not caught by bugprone-unused-local-non-trivial-variable, Clang has a different warning but GCC doesn't have any: https://stackoverflow.com/questions/55977431/gcc-and-clang-not-warning-on-unused-exception-variable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants