COMP: Fix missing initialization braces warning#2756
Merged
jhlegarreta merged 1 commit intoInsightSoftwareConsortium:masterfrom Sep 24, 2021
Merged
Conversation
Member
Author
tbirdso
suggested changes
Sep 24, 2021
Contributor
|
That warning is pretty useless, and I've tried to disable it, see here: https://open.cdash.org/build/7475017/notes note presence of |
c22f0c9 to
3265872
Compare
dzenanz
approved these changes
Sep 24, 2021
Member
dzenanz
left a comment
There was a problem hiding this comment.
Code looks good, but this is about pleasing the compilers 😄
N-Dekker
reviewed
Sep 24, 2021
Fix missing initialization braces warning.
Fixes:
````
[CTest: warning matched]
/Users/builder/externalModules/Filtering/LabelMap/test/itkLabelImageToLabelMapFilterTest.cxx:29:37:
warning: suggest braces around initialization of subobject [-Wmissing-braces]
p_image->SetRegions(itk::Size<3>{ 0, 0, 0 });
^~~~~~~
{ }
[CTest: warning suppressed] 1 warning generated.
```
and
```
[CTest: warning matched]
/Users/builder/externalModules/Filtering/ImageFeature/test/itkLaplacianImageFilterTest.cxx:62:36:
warning: suggest braces around initialization of subobject [-Wmissing-braces]
itk::Vector<float, 2> spacin{ { 0.5, 5.0 } };
^~~~~~~~
{ }
[CTest: warning suppressed] 1 warning generated.
```
reported at:
https://open.cdash.org/viewBuildError.php?type=1&buildid=7475017
3265872 to
33d1d0d
Compare
Member
Author
|
The |
hjmjohnson
pushed a commit
to hjmjohnson/ITK
that referenced
this pull request
May 6, 2026
…xMissingInitializationBracesWarning COMP: Fix missing initialization braces warning
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.
Fix missing initialization braces warning.
Fixes:
and
reported at:
https://open.cdash.org/viewBuildError.php?type=1&buildid=7475017
PR Checklist