[Libreoffice] Variable 'bFreePixmap' is not assigned a value in vcl/unx/source/gdi/salbmp.cxx

Julien Nabet serval2412 at yahoo.fr
Thu May 19 11:37:40 PDT 2011


Le 19/05/2011 12:42, Michael Meeks a écrit :
> On Sun, 2011-05-08 at 15:09 +0200, Julien Nabet wrote:
>> I found this with cppcheck :
>> [vcl/unx/source/gdi/salbmp.cxx:795]: (style) Variable 'bFreePixmap' is
>> not assigned a value
> 	Ho hum - I beg to differ:
>
>          bool bFreePixmap = false;
>          if( bSuccess&&  (args[0]>>= bFreePixmap)&&  bFreePixmap )
>
> 	Surely we assign it a value with the>>= operator ? true - it is not a
> particularly pleasant use of the operator - but hey - UNO is like that
> (sexy huh?). Why have:
>
> 	any.isBoolean()&&  any.asBoolean()
>
> 	or something - when we can have some mind-mashed operator, and a
> confusing temporary ;-)
Argh ! I had just missed this operator. I should have waited for the 
next day before sending this mail :-)


> 	Or did I miss something ? presumably another cppcheck false-positive
> that needs filing&  fixing (?).
For the moment, it's hard to talk about false positive for cppcheck 
since we should use it by referencing all the include files. (I don't 
know how to do it quickly). Caolan had talked about it  (i don't 
remember when precisely).

Julien.


More information about the LibreOffice mailing list