Skip to content

COMP: Fix testing macro call and array initialization errors#3017

Merged
hjmjohnson merged 1 commit intoInsightSoftwareConsortium:masterfrom
jhlegarreta:FixTestCompilationErrors
Jan 1, 2022
Merged

COMP: Fix testing macro call and array initialization errors#3017
hjmjohnson merged 1 commit intoInsightSoftwareConsortium:masterfrom
jhlegarreta:FixTestCompilationErrors

Conversation

@jhlegarreta
Copy link
Copy Markdown
Member

Fix call to basic object method exercise macro and array initialization
compilation errors.

Fixes:

[CTest: warning matched]
/Users/builder/external/ITK-AppleClang-dbg-Universal/Modules/ThirdPartysrc/vxl/vcl/vcl_compiler.h:2:9:
warning: macro name is a reserved identifier [-Wreserved-id-macro]
        ^
/Users/builder/externalModules/Core/Transform/test/itkRigid3DPerspectiveTransformTest.cxx:62:46:
error: use of undeclared identifier 'Rigid3DPerspectiveTransform'
    EXERCISE_BASIC_OBJECT_METHODS(transform, Rigid3DPerspectiveTransform, Transform);
                                             ^
/Users/builder/externalModules/Core/Transform/test/itkRigid3DPerspectiveTransformTest.cxx:62:75:
error: use of undeclared identifier 'Transform'
    EXERCISE_BASIC_OBJECT_METHODS(transform, Rigid3DPerspectiveTransform, Transform);
                                                                          ^
[CTest: warning matched] 1 warning and 2 errors generated.

and

[CTest: warning matched]
/Users/builder/externalModules/Core/Transform/test/itkRigid3DPerspectiveTransformTest.cxx:42:55:
warning: suggest braces around initialization of subobject [-Wmissing-braces]
    typename TransformType::InputVectorType vector{ { 1.0, 4.0, 9.0 } };
                                                      ^~~~~~~~~~~~~
                                                      {            }
[CTest: warning matched]
/Users/builder/externalModules/Core/Transform/test/itkRigid3DPerspectiveTransformTest.cxx:53:59:
warning: suggest braces around initialization of subobject [-Wmissing-braces]
    typename TransformType::InputPointType       point{ { 1.0, 1.0, 1.0 } };
                                                          ^~~~~~~~~~~~~
                                                          {            }
[CTest: warning suppressed] 2 warnings generated.

and

[CTest: warning matched]
/Users/builder/externalModules/Filtering/FastMarching/test/itkFastMarchingTest.cxx:155:73:
warning: suggest braces around initialization of subobject [-Wmissing-braces]
  typename FloatFMType::LevelSetImageType::IndexType outputRegionIndex{ outputRegionIndexValue };
                                                                        ^~~~~~~~~~~~~~~~~~~~~~
                                                                        {                     }
[CTest: warning suppressed] 1 warning generated.

reported for example in:
https://open.cdash.org/viewBuildError.php?buildid=7652795
and
https://open.cdash.org/viewBuildError.php?type=1&buildid=7652659

PR Checklist

Fix call to basic object method exercise macro and array initialization
compilation errors.

Fixes:
```
[CTest: warning matched]
/Users/builder/external/ITK-AppleClang-dbg-Universal/Modules/ThirdPartysrc/vxl/vcl/vcl_compiler.h:2:9:
warning: macro name is a reserved identifier [-Wreserved-id-macro]
        ^
/Users/builder/externalModules/Core/Transform/test/itkRigid3DPerspectiveTransformTest.cxx:62:46:
error: use of undeclared identifier 'Rigid3DPerspectiveTransform'
    EXERCISE_BASIC_OBJECT_METHODS(transform, Rigid3DPerspectiveTransform, Transform);
                                             ^
/Users/builder/externalModules/Core/Transform/test/itkRigid3DPerspectiveTransformTest.cxx:62:75:
error: use of undeclared identifier 'Transform'
    EXERCISE_BASIC_OBJECT_METHODS(transform, Rigid3DPerspectiveTransform, Transform);
                                                                          ^
[CTest: warning matched] 1 warning and 2 errors generated.
```

and
```
[CTest: warning matched]
/Users/builder/externalModules/Core/Transform/test/itkRigid3DPerspectiveTransformTest.cxx:42:55:
warning: suggest braces around initialization of subobject [-Wmissing-braces]
    typename TransformType::InputVectorType vector{ { 1.0, 4.0, 9.0 } };
                                                      ^~~~~~~~~~~~~
                                                      {            }
[CTest: warning matched]
/Users/builder/externalModules/Core/Transform/test/itkRigid3DPerspectiveTransformTest.cxx:53:59:
warning: suggest braces around initialization of subobject [-Wmissing-braces]
    typename TransformType::InputPointType       point{ { 1.0, 1.0, 1.0 } };
                                                          ^~~~~~~~~~~~~
                                                          {            }
[CTest: warning suppressed] 2 warnings generated.
```

and
```
[CTest: warning matched]
/Users/builder/externalModules/Filtering/FastMarching/test/itkFastMarchingTest.cxx:155:73:
warning: suggest braces around initialization of subobject [-Wmissing-braces]
  typename FloatFMType::LevelSetImageType::IndexType outputRegionIndex{ outputRegionIndexValue };
                                                                        ^~~~~~~~~~~~~~~~~~~~~~
                                                                        {                     }
[CTest: warning suppressed] 1 warning generated.
```

reported for example in:
https://open.cdash.org/viewBuildError.php?buildid=7652795
and
https://open.cdash.org/viewBuildError.php?type=1&buildid=7652659
@jhlegarreta
Copy link
Copy Markdown
Member Author

All introduced in PR #3003. My bad.

@github-actions github-actions Bot added area:Core Issues affecting the Core module area:Filtering Issues affecting the Filtering module type:Compiler Compiler support or related warnings type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct labels Dec 31, 2021
Copy link
Copy Markdown
Member

@dzenanz dzenanz left a comment

Choose a reason for hiding this comment

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

Thanks for the follow-up. No need to apologize!

@hjmjohnson hjmjohnson merged commit 7e37b19 into InsightSoftwareConsortium:master Jan 1, 2022
@jhlegarreta jhlegarreta deleted the FixTestCompilationErrors branch January 1, 2022 17:21
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:Filtering Issues affecting the Filtering module type:Compiler Compiler support or related warnings type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants