[SOLVED] Re: Cppcheck: 'bMark' is assigned a value never used (sc module)
Julien Nabet
serval2412 at yahoo.fr
Wed Feb 13 09:48:58 PST 2013
On 13/02/2013 17:52, Eike Rathke wrote:
> Hi julien2412,
>
> On Wednesday, 2013-02-13 06:24:20 -0800, julien2412 wrote:
>
>> Cppcheck reported this:
>> sc/source/ui/view/tabview2.cxx
>> 970 unreadVariable style Variable 'bMark' is assigned a value that is never
>> ...
>> See
>> http://opengrok.libreoffice.org/xref/core/sc/source/ui/view/tabview2.cxx#950
>>
>> Is line 970 can be removed or is something lacking?
> It can be removed. However, I suggest to also remove line 955 and change
> line 957
>
> - if (bMark || bMulti)
> + if (rMark.IsMarked() || bMulti)
>
> So no one accidentally assumes bMark would be valid after that scope.
Thank you for your feedback Eike!
I pushed the patch on master, see
http://cgit.freedesktop.org/libreoffice/core/commit/?id=c3aad7456adb8a24e2350c9b50778adefb2d1444
Julien
More information about the LibreOffice
mailing list