Same expression on both sides of '|'

julien2412 serval2412 at yahoo.fr
Thu Feb 9 14:32:04 PST 2012


Hello,

Cppcheck reports this :
[formmetadata.cxx:169] -> [formmetadata.cxx:169]: (style) Same expression on
both sides of '|'

Here's the line :
DEF_INFO_4( INSERTONLY,        DATAENTRY,          DATAENTRY,        
FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE, COMPOSEABLE ),

If we look at the definition of the macro :
#define DEF_INFO_4( ident, uinameres, helpid, flag1, flag2, flag3, flag4 ) \
    DEF_INFO( ident, uinameres, helpid, PROP_FLAG_##flag1 |
PROP_FLAG_##flag2 | PROP_FLAG_##flag3 | PROP_FLAG_##flag4 )

the pb the presence of "COMPOSEABLE" twice.

Searching in git history, I found the commit
0aaf3fb6af9dfa91b2597894930fdc8b23041308
which replaced this line (there are others) :
DEF_INFO_2( INSERTONLY,        DATAENTRY,          DATAENTRY,        
FORM_VISIBLE, DATA_PROPERTY ),
by
this one :
DEF_INFO_4( INSERTONLY,        DATAENTRY,          DATAENTRY,        
FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE, COMPOSEABLE ),

So it could be this :
DEF_INFO_3( INSERTONLY,        DATAENTRY,          DATAENTRY,        
FORM_VISIBLE, DATA_PROPERTY, COMPOSEABLE),

but it could also be DEF_INFO_4 with 1 extra property or even DEF_INFO_5
with 2 extra properties.

Any idea ?

Julien.

--
View this message in context: http://nabble.documentfoundation.org/Same-expression-on-both-sides-of-tp3731097p3731097.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list