[Libreoffice] [REVIEW] patch for 2 bitwiseOnBoolean detected cppcheck

David Tardon dtardon at redhat.com
Thu Sep 15 22:38:21 PDT 2011


On Thu, Sep 15, 2011 at 02:43:06PM -0700, julien2412 wrote:
> Hello,
>  
> Here is a patch on 2 different code parts. Cppcheck detected these :
> core/vcl/source/gdi/sallayout.cxx
> 743	bitwiseOnBoolean	style	Boolean variable 'bAllOk' is used in bitwise
> operation. Did you mean && ?

Yes, that should be &&.

> 
> core/sfx2/source/appl/workwin.cxx
> 1073	bitwiseOnBoolean	style	Boolean variable 'bInvisible' is used in bitwise
> operation. Did you mean && ?

Actually the "bInvisible &" part is not even necessary there (the law of
excluded middle).

> 
> They seem not "false positive" or some kind of "C++ trick" in my opinion but
> I'd like your opinion about them.
> 
> As usual, if you think it's ok, I can commit and push them on master.

Please do.

D.


More information about the LibreOffice mailing list