[REVIEW for 4.0 and 3.6] Missing parenthesis in ucb/source/ucp/file/bc.cxx

julien2412 serval2412 at yahoo.fr
Sun Jan 13 07:01:09 PST 2013


Hello,

Cppcheck detected this:
ucb/source/ucp/file/bc.cxx
1175	clarifyCondition	style	Boolean result is used in bitwise operation.
Clarify expression with parentheses
   1173     // Inserts the content, which has the flag m_bIsFresh
   1174 
   1175     if( ! m_nState & NameForInsertionSet )
   1176     {
   1177         m_pMyShell->installError( nMyCommandIdentifier,
   1178                                  
TASKHANDLING_NONAMESET_INSERT_COMMAND );
   1179         return;
   1180     }

In
http://cgit.freedesktop.org/libreoffice/core/commit/?id=a2dd3feaea16a765956aecacdd6cc21ab5404a5b,
I added missing parenthesis because according to
http://en.cppreference.com/w/cpp/language/operator_precedence, AND bitwise
has less priority than !

Could someone cherry-pick this to 4.0 branch and 3.6?

Julien



--
View this message in context: http://nabble.documentfoundation.org/REVIEW-for-4-0-and-3-6-Missing-parenthesis-in-ucb-source-ucp-file-bc-cxx-tp4028864.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list