You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Daily compile of Trompeloeil unit tests with clang-latest shows this warning generated:
test/compiling_tests_11.cpp:245:24:
warning: empty expression statement has no effect;
remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
INFO("msg=" << msg);
^
63 warnings total.
Using Catch version 2.2.3.
Same errors occur with Catch 2.4.2, released 26 October 2018.
The issue is with Catch2: WARN and CAPTURE macros expect a semicolon
to terminate them (see INTERNAL_CATCH_MSG, INTERNAL_CATCH_CAPTURE). INFO forwards to INTERNAL_CATCH_INFO which has a trailing semicolon.
The examples in the Catch documentation are also inconsistent, with semicolon
terminating INFO in some examples and no semicolon terminating INFO in
other examples. All examples require a semicolon.
Will raise an issue with the Catch project, if one doesn't already exist.
Added -Wno-extra-semi-stmt to self_test target, for clang compilers that supports it, so that we can build clean with clang-8. It's a pity, but not a big issue.
Daily compile of Trompeloeil unit tests with
clang-latest
shows this warning generated:63 warnings total.
Using Catch version 2.2.3.
Same errors occur with Catch 2.4.2, released 26 October 2018.
Warning was 'refined' in this Clang/LLVM commit
What to do
Some options:
INFO
macro.The text was updated successfully, but these errors were encountered: