[SOLVED] Re: Cppcheck: 'nTotalItems' is assigned a value never used (sfx2 part)

Julien Nabet serval2412 at yahoo.fr
Tue Mar 5 11:03:58 PST 2013


On 05/03/2013 17:37, Caolán McNamara wrote:
> On Tue, 2013-02-12 at 06:23 -0800, julien2412 wrote:
>> Cppcheck reported this:
>> sfx2/source/control/thumbnailview.cxx
>> 293	unreadVariable	style	Variable 'nTotalItems' is assigned a value that is
>> never used.
>>
>> See
>> http://opengrok.libreoffice.org/xref/core/sfx2/source/control/thumbnailview.cxx#280
>>
>> Searching in git history, I noticed the value of it wasn't used since
>> 2012-08-15
>> http://cgit.freedesktop.org/libreoffice/core/commit/?id=709a6c1541e53f19a742048ef34ac06b5e7df251
> 5f0a0e82d9bffde6cbee6538d6eff435f4676386 cut a hunk of them out too.
>
> Unless Rafael has any plans to revisit that thumbnailviewer I think
> you're on safe ground to remove the assignations to nTotalItems.
>
> C.
>
Thank you for your feedback, I pushed the patch on master (see 
http://cgit.freedesktop.org/libreoffice/core/commit/?id=03c51284b9a23dabc9139504691d061ce38be279)

Julien
PS : i wasn't sure if  the 3 lines comment concerned the block removed 
or the whole block (I mean the lines after the removed block too) so I 
prefered let it.


More information about the LibreOffice mailing list