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

Gilles Caulier caulier.gilles at gmail.com
Thu May 17 21:02:27 BST 2018


As i can see too, the noCopyConstructor are mostly false positive, excepted
for some cases where this king of constructor must be explicit and not
delegate to the compiler. There are a lots of reports, and to review all
will take a while.

Gilles

2018-05-17 22:00 GMT+02:00 Gilles Caulier <caulier.gilles at gmail.com>:

> The noConstructor warnings are all false positive as i can see, or i don't
> understand the warning description.
>
> Gilles
>
> 2018-05-17 21:59 GMT+02:00 Gilles Caulier <caulier.gilles at gmail.com>:
>
>> Look also the noExplicitConstructor entries :
>>
>> https://www.digikam.org/reports/cppcheck/master/
>>
>> Currently, with Krazy static analyzer, i disable the warnings, and all
>> re-appear with cppcheck.
>>
>> This is a tedious problem. Try to force a missing explicit constructor,
>> as :
>>
>> https://www.digikam.org/reports/cppcheck/master/93.html#line-73
>>
>> https://www.digikam.org/reports/cppcheck/master/93.html#line-89
>>
>> From Face Management code, and you will see a lots of errors.
>>
>> Typically, the right constructor choice is delegate to the compiler, and
>> the state at run time can be undefined. This is especially the case for
>> contructor with one argument or more than one but with 2nd, 3rd, etc...
>> using default values.
>>
>> I already fixed some simple case, but it's the hell to apply fix
>> everywhere, and i'm sure that side effect are introduced without explicit
>> specifier.
>>
>> More details here :
>>
>> https://stackoverflow.com/questions/121162/what-does-the-
>> explicit-keyword-mean
>>
>> Gilles
>>
>> 2018-05-17 19:19 GMT+02:00 Gilles Caulier <caulier.gilles at gmail.com>:
>>
>>> 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 ?
>>>
>>> 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
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20180517/597a5e9c/attachment.html>


More information about the Digikam-devel mailing list