-
-
Notifications
You must be signed in to change notification settings - Fork 686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wunused macros #4673
Merged
hjmjohnson
merged 3 commits into
InsightSoftwareConsortium:master
from
andrei-sandor:WunusedMacros
May 31, 2024
Merged
Wunused macros #4673
hjmjohnson
merged 3 commits into
InsightSoftwareConsortium:master
from
andrei-sandor:WunusedMacros
May 31, 2024
Conversation
This file contains 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
github-actions
bot
added
type:Testing
Ensure that the purpose of a class is met/the results on a wide set of test cases are correct
area:Core
Issues affecting the Core module
area:IO
Issues affecting the IO module
area:Segmentation
Issues affecting the Segmentation module
labels
May 16, 2024
dzenanz
reviewed
May 16, 2024
andrei-sandor
force-pushed
the
WunusedMacros
branch
3 times, most recently
from
May 29, 2024 00:48
560800e
to
d69739d
Compare
seanm
reviewed
May 29, 2024
seanm
reviewed
May 29, 2024
This is a commit to solve the Wunused-macros warning generated by clang related to ITK_LEGACY_REMOVE macro. The change is to create an ifnded macro with it even if ITK_LEGACY_REMOVE is not used in the file. In itkConfigue.h, ITK_LEGACY_REMOVE is defined there if the code is in the legacy remove scenario or not. We need to keep ITK_LEGACY_REMOVE to create a flag that the code is legacy.
andrei-sandor
force-pushed
the
WunusedMacros
branch
2 times, most recently
from
May 30, 2024 13:51
3ecc085
to
cc4b585
Compare
seanm
reviewed
May 30, 2024
/azp.run ITK.Linux |
This is to fix the -Wunused-macros warning from clang. This is about fixing general macros used in the code. In the commit, the macros are removed. However, I am wondering if we should comment them since someone might use them in the future.
This is to fix the -Wunused-macros generated by clang for macros related to MSVC and Microsoft. For itkNumericTraitsTest.cxx, the _MSC_VER is added to respect the comment. For itkTestDriver.cxx, ITK_TEST_DRIVER_PATH_SLASH / is related to non Windows machine and there is none in the code and hence it is removed. Now, for ITK_TEST_DRIVER_PATH_SLASH \\, it is not found in the entire code. This is the reason why it is removed.
andrei-sandor
force-pushed
the
WunusedMacros
branch
from
May 31, 2024 12:38
cc4b585
to
a4c3ca0
Compare
seanm
approved these changes
May 31, 2024
hjmjohnson
approved these changes
May 31, 2024
hjmjohnson
merged commit May 31, 2024
b6ab07f
into
InsightSoftwareConsortium:master
14 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area:Core
Issues affecting the Core module
area:IO
Issues affecting the IO module
area:Segmentation
Issues affecting the Segmentation module
type:Testing
Ensure that the purpose of a class is met/the results on a wide set of test cases are correct
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.
COMP: Fix unused macros related to MSVC and OS
This is to fix the -Wunused-macros generated by clang for macros related to MSVC and Microsoft.
For itkNumericTraitsTest.cxx, the _MSC_VER is added to respect the comment.
For itkTestDriver.cxx, ITK_TEST_DRIVER_PATH_SLASH / is related to non Windows machine and there is none in the code and hence it is removed. Now, for ITK_TEST_DRIVER_PATH_SLASH \, it is not found in the entire code. This is the reason why it is removed.
COMP: Fix unused general macros
This is to fix the -Wunused-macros warning from clang. This is about fixing general macros used in the code.
In the commit, the macros are removed. However, I am wondering if we should comment them since someone might use them in the future.
COMP: Fixed unused legacy remove Macros
This is a commit to solve the Wunused-macros warning generated by clang related to ITK_LEGACY_REMOVE macro.
The change is to create an ifnded macro with it even if ITK_LEGACY_REMOVE is not used in the file. In itkConfigue.h, ITK_LEGACY_REMOVE is defined there if the code is in the legacy remove scenario or not. We need to keep ITK_LEGACY_REMOVE to create a flag that the code is legacy.