Cppcheck reports "Logical conjunction always evaluates to false" in text_gfx.cxx

julien2412 serval2412 at yahoo.fr
Sun Mar 18 06:39:27 PDT 2012


Hello,

Cppcheck reports this :
[generic/print/text_gfx.cxx:105]: (warning) Logical conjunction always
evaluates to false: nChar < 65380 && nChar >= 65387

Here are the lines :
   103         if( ( nChar >= 0x3008 && nChar < 0x3019 && nChar != 0x3012 )
||
    104             nChar == 0xff3b || nChar == 0xff3d ||
    105             (nChar >= 0xff6b && nChar < 0xff64 ) ||
    106             nChar == 0xffe3
    107             )
    108             nAngle = 0;

Shoud the line 105 just be replaced by :
 (nChar >= 0xff64 && nChar < 0xff6b ) ||

Or is it less obvious/more tricky than that ?

If ok, I can commit and push it on master of course.

Julien.

--
View this message in context: http://nabble.documentfoundation.org/Cppcheck-reports-Logical-conjunction-always-evaluates-to-false-in-text-gfx-cxx-tp3836511p3836511.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list