[Libreoffice-bugs] [Bug 122639] New: With gcc flag -Werror programs are not compiling using the lib
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Thu Jan 10 15:59:24 UTC 2019
https://bugs.documentfoundation.org/show_bug.cgi?id=122639
Bug ID: 122639
Summary: With gcc flag -Werror programs are not compiling using
the lib
Product: cppunit
Version: 1.14
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: General
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: groll at cs.uni-kl.de
CC: markus.mohrhard at googlemail.com
If I use -Werror for compiling my program which uses cppunit it is not
compiling.
The error is:
error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
...
note: ...this statement, but the latter is misleadingly indented as if it were
guarded by the ‘if’
This is because of line 520 and following in TestAssert.h:
if ( cpputCorrectExceptionThrown_ ) \
break; \
CPPUNIT_NS::Asserter::fail( cpputMsg_, \
CPPUNIT_SOURCELINE() ); \
Here everything will be in one line for the compiler because of the macro
implementation and only the break is inside of the if body and not the
following stuff but it seems like the following has also to be in the if body.
This can be fixed with easy adding some brackets:
if ( cpputCorrectExceptionThrown_ ) \
{ break; } \
CPPUNIT_NS::Asserter::fail( cpputMsg_, \
CPPUNIT_SOURCELINE() ); \
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190110/0ab0b85f/attachment-0001.html>
More information about the Libreoffice-bugs
mailing list