Bug 100760

Summary: core/vcl/source/control/tabctrl.cxx:1202]: (style) Redundant condition
Product: LibreOffice Reporter: dcb314
Component: BaseAssignee: Gabriel Adriano <gaadrime.melo>
Status: RESOLVED FIXED    
Severity: enhancement CC: mentoring, serval2412
Priority: medium Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:

Description dcb314 2016-07-04 14:03:53 UTC
core/vcl/source/control/tabctrl.cxx:1202]: (style) Redundant condition: mbHideDisabledTabs. '!A || (A && B)' is equivalent to '!A || B'

Source code is

   if(!mbHideDisabledTabs || (mbHideDisabledTabs && pItem->mbEnabled))
Comment 1 Julien Nabet 2016-07-04 18:52:17 UTC
You're right! (cf http://dev-builds.libreoffice.org/cppcheck_reports/master/)
Would you like to get involved and propose a patch? (see https://wiki.documentfoundation.org/Development/GetInvolved)
Comment 2 dcb314 2016-07-04 19:09:27 UTC
If cppcheck is used on the source code reasonably frequently and
someone is looking at the reports and fixing bugs, then there
is no need for me to be involved further.
Comment 3 jani 2016-07-05 06:08:54 UTC
(In reply to dcb314 from comment #2)
> If cppcheck is used on the source code reasonably frequently and
> someone is looking at the reports and fixing bugs, then there
> is no need for me to be involved further.

cppcheck is used frequently, it runs automatically, but it takes a human to fix bugs, so we need people to be involved.

Please remember this software is made by volunteers, so every little drop helps make the software better.
Comment 4 jani 2016-07-11 06:05:13 UTC
Change status to ASSIGNED
Comment 5 Gabriel Adriano 2016-07-16 00:57:12 UTC
Already fixed by krishna keshav https://gerrit.libreoffice.org/#/c/26984/3