cppcheck warnings... Mostly fixed, but not few one...

Kåre Särs kare.sars at iki.fi
Mon May 21 06:53:55 BST 2018


On torsdag 17 maj 2018 kl. 20:19:47 EEST Gilles Caulier wrote:
> Hi all,
> I very well advanced with cppcheck static analyzer reports review, and i
> fixed around 300 entries since 2 weeks...
> But, as usual, the mostly difficult task is always at end, and the last
> reports sound like... special...
> Look this one :
> https://www.digikam.org/reports/cppcheck/master/27.html#line-195
> If we have really an error here, digiKam will crash very quickly when an
> image is open with DImg container. A false positive ?

I guess the situation is that you do not make copies of the LensFunInterface 
instances and that's why you do not get any crashes. A d-pointer class very 
seldom is an object that you add to containers like QVectors and QLists so I 
don't think it is a problem. 

What you could do is to explicitly disable the copy-constructor and that would 
also shut up the warning at the same time.


> And what's about these 4 entries about equality operator :
> https://www.digikam.org/reports/cppcheck/master/17.html#line-90
> https://www.digikam.org/reports/cppcheck/master/48.html#line-179
> https://www.digikam.org/reports/cppcheck/master/83.html#line-55
> https://www.digikam.org/reports/cppcheck/master/94.html#line-531
> And definitively, i lost with these one :
> https://www.digikam.org/reports/cppcheck/master/51.html#line-635
> https://www.digikam.org/reports/cppcheck/master/67.html#line-56
> https://www.digikam.org/reports/cppcheck/master/70.html#line-185
> https://www.digikam.org/reports/cppcheck/master/70.html#line-188
> https://www.digikam.org/reports/cppcheck/master/70.html#line-191
> Where these virtual calls appears in source code ?
> Any tips, viewpoints, and guidance ?
> Best
> Gilles Caulier

More information about the Digikam-devel mailing list