Closed seanm closed 2 months ago
This should fix some of these warnings:
https://open.cdash.org/viewBuildError.php?type=1&buildid=9572940
@seanm Ran clang-formatter:
./Utilities/Maintenance/clang-format.bash --clang-format /Users/johnsonhj/Dashboard/src/ITK/cmake-build-release/clang-format-Darwin --tracked
Thanks for the touch-ups!
This PR has removed CLANG_SUPPRESS_Wfloat_equal which was used in my code: https://my.cdash.org/viewBuildError.php?buildid=2552633 There is a quick fix of course but other users might still use CLANG_SUPPRESS_Wfloat_equal. Was this intentional? I wonder why it's not been kept since CLANG_PRAGMA_PUSH and CLANG_PRAGMA_POP have been kept.
Hmm, although it's in a public header, I didn't imaging anyone using it.
I'll make a new MR to bring it back. Probably not until later today though, as I'm just recovering from a stomach bug.
Introduced GCC_PRAGMA_PUSH macro and friends, similiar to existing CLANG_PRAGMA_PUSH and friends, but that applies to both GCC and Clang, which share many warning flags.
Added macros to suppess -Wformat-nonliteral warnings. Used them in a few places where the warnings are impossible to fix with ITK's current API.
Made -Wfloat-equal apply to GCC now, in addition to Clang.
Also added these macros as StatementMacros in the .clang-format file, so that clang-format formats them more nicely. Redid some formatting.
PR Checklist
Refer to the ITK Software Guide for further development details if necessary.