New Defects reported by Coverity Scan for digiKam
scan-admin at coverity.com
scan-admin at coverity.com
Sun Jul 12 11:09:52 BST 2020
Hi,
Please find the latest report on new defect(s) introduced to digiKam found with Coverity Scan.
8 new defect(s) introduced to digiKam found with Coverity Scan.
8 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 8 of 8 defect(s)
** CID 1465272: Incorrect expression (USELESS_CALL)
________________________________________________________________________________________________________
*** CID 1465272: Incorrect expression (USELESS_CALL)
/usr/lib64/qt5/include/QtCore/qvector.h: 823 in QVector<Digikam::VideoStripFilter *>::erase(QTypedArrayData<Digikam::VideoStripFilter *>::iterator, QTypedArrayData<Digikam::VideoStripFilter *>::iterator)()
817 aend = abegin + itemsToErase;
818 if (!QTypeInfoQuery<T>::isRelocatable) {
819 iterator moveBegin = abegin + itemsToErase;
820 iterator moveEnd = d->end();
821 while (moveBegin != moveEnd) {
822 if (QTypeInfo<T>::isComplex)
>>> CID 1465272: Incorrect expression (USELESS_CALL)
>>> Calling "abegin.operator VideoStripFilter **()" is only useful for its return value, which is ignored.
823 static_cast<T *>(abegin)->~T();
824 new (abegin++) T(*moveBegin++);
825 }
826 if (abegin < d->end()) {
827 // destroy rest of instances
828 destruct(abegin, d->end());
** CID 1465271: Incorrect expression (USELESS_CALL)
________________________________________________________________________________________________________
*** CID 1465271: Incorrect expression (USELESS_CALL)
/usr/lib64/qt5/include/QtCore/qvector.h: 823 in QVector<Digikam::Album *>::erase(QTypedArrayData<Digikam::Album *>::iterator, QTypedArrayData<Digikam::Album *>::iterator)()
817 aend = abegin + itemsToErase;
818 if (!QTypeInfoQuery<T>::isRelocatable) {
819 iterator moveBegin = abegin + itemsToErase;
820 iterator moveEnd = d->end();
821 while (moveBegin != moveEnd) {
822 if (QTypeInfo<T>::isComplex)
>>> CID 1465271: Incorrect expression (USELESS_CALL)
>>> Calling "abegin.operator Album **()" is only useful for its return value, which is ignored.
823 static_cast<T *>(abegin)->~T();
824 new (abegin++) T(*moveBegin++);
825 }
826 if (abegin < d->end()) {
827 // destroy rest of instances
828 destruct(abegin, d->end());
** CID 1465270: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/mnt/devel/GIT/7.x/core/utilities/queuemanager/manager/queuesettings.h: 43 in ()
________________________________________________________________________________________________________
*** CID 1465270: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/mnt/devel/GIT/7.x/core/utilities/queuemanager/manager/queuesettings.h: 43 in ()
37 namespace Digikam
38 {
39
40 /**
41 * This container host all common settings used by a queue, not including assigned batch tools
42 */
>>> CID 1465270: Low impact quality (MISSING_MOVE_ASSIGNMENT)
>>> Class "Digikam::QueueSettings" may benefit from adding a move assignment operator. See other events which show the copy assignment operator being applied to rvalue(s), where a move assignment may be faster.
43 class QueueSettings
44 {
45
46 public:
47
48 enum RenamingRule
** CID 1465269: Resource leaks (RESOURCE_LEAK)
/mnt/devel/GIT/7.x/core/dplugins/dimg/heif/dimgheifloader_load.cpp: 336 in Digikam::DImgHEIFLoader::readHEICImageByHandle(heif_image_handle *, heif_image *, bool)()
________________________________________________________________________________________________________
*** CID 1465269: Resource leaks (RESOURCE_LEAK)
/mnt/devel/GIT/7.x/core/dplugins/dimg/heif/dimgheifloader_load.cpp: 336 in Digikam::DImgHEIFLoader::readHEICImageByHandle(heif_image_handle *, heif_image *, bool)()
330 if (!isHeifSuccess(&error))
331 {
332 loadingFailed();
333 heif_image_handle_release(image_handle);
334 heif_decoding_options_free(decode_options);
335
>>> CID 1465269: Resource leaks (RESOURCE_LEAK)
>>> Returning without freeing "heif_image" leaks the storage that it points to.
336 return false;
337 }
338
339 if (m_observer)
340 {
341 m_observer->progressInfo(0.3F);
** CID 1465268: Resource leaks (RESOURCE_LEAK)
/mnt/devel/GIT/7.x/core/libs/metadataengine/dmetadata/dmetadata_libheif.cpp: 66 in Digikam::s_readHEICMetadata(heif_context *, unsigned int, QByteArray &, QByteArray &, QByteArray &)()
________________________________________________________________________________________________________
*** CID 1465268: Resource leaks (RESOURCE_LEAK)
/mnt/devel/GIT/7.x/core/libs/metadataengine/dmetadata/dmetadata_libheif.cpp: 66 in Digikam::s_readHEICMetadata(heif_context *, unsigned int, QByteArray &, QByteArray &, QByteArray &)()
60 struct heif_error error1 = heif_context_get_image_handle(heif_context,
61 image_id,
62 &image_handle);
63
64 if (!s_isHeifSuccess(&error1))
65 {
>>> CID 1465268: Resource leaks (RESOURCE_LEAK)
>>> Variable "image_handle" going out of scope leaks the storage it points to.
66 return;
67 }
68
69 heif_item_id dataIds[10];
70
71 int count = heif_image_handle_get_list_of_metadata_block_IDs(image_handle,
** CID 1465267: Control flow issues (NO_EFFECT)
/mnt/devel/GIT/7.x/core/libs/rawengine/libraw/src/metadata/canon.cpp: 595 in LibRaw::parseCanonMakernotes(unsigned int, unsigned int, unsigned int, unsigned int)()
________________________________________________________________________________________________________
*** CID 1465267: Control flow issues (NO_EFFECT)
/mnt/devel/GIT/7.x/core/libs/rawengine/libraw/src/metadata/canon.cpp: 595 in LibRaw::parseCanonMakernotes(unsigned int, unsigned int, unsigned int, unsigned int)()
589
590 } else if ((tag == 0x0029) && (dng_writer == nonDNG)) { // PowerShot G9
591 int Got_AsShotWB = 0;
592 fseek(ifp, 8, SEEK_CUR);
593 for (int linenum = 0; linenum < nCanon_G9_linenums_2_StdWBi; linenum++) {
594 if (*(Canon_G9_linenums_2_StdWBi + linenum) != LIBRAW_WBI_Unknown
>>> CID 1465267: Control flow issues (NO_EFFECT)
>>> This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "this->imgdata.makernotes.canon.wbi >= 0U".
595 && imCanon.wbi < nCanon_wbi2std && imCanon.wbi >= 0) {
596 FORC4 icWBC[*(Canon_G9_linenums_2_StdWBi + linenum)][GRBG_2_RGBG(c)] = get4();
597 if (Canon_wbi2std[imCanon.wbi] == *(Canon_G9_linenums_2_StdWBi + linenum)) {
598 FORC4 cam_mul[c] = icWBC[*(Canon_G9_linenums_2_StdWBi + linenum)][c];
599 Got_AsShotWB = 1;
600 }
** CID 1465266: Memory - illegal accesses (UNINIT)
/mnt/devel/GIT/7.x/core/dplugins/generic/webservices/filecopy/fcexportwindow.cpp: 92 in DigikamGenericFileCopyPlugin::FCExportWindow::FCExportWindow(Digikam::DInfoInterface *, QWidget *)()
________________________________________________________________________________________________________
*** CID 1465266: Memory - illegal accesses (UNINIT)
/mnt/devel/GIT/7.x/core/dplugins/generic/webservices/filecopy/fcexportwindow.cpp: 92 in DigikamGenericFileCopyPlugin::FCExportWindow::FCExportWindow(Digikam::DInfoInterface *, QWidget *)()
86 const QString FCExportWindow::Private::IMAGE_COMPRESSION = QLatin1String("imageCompression");
87 const QString FCExportWindow::Private::REMOVE_METADATA = QLatin1String("removeMetadata");
88
89 const QString FCExportWindow::Private::DIALOG = QLatin1String("FileCopy Export Dialog");
90
91 FCExportWindow::FCExportWindow(DInfoInterface* const iface, QWidget* const /*parent*/)
>>> CID 1465266: Memory - illegal accesses (UNINIT)
>>> Using uninitialized value "this->d".
92 : WSToolDialog(nullptr, d->DIALOG),
93 d(new Private)
94 {
95 d->exportWidget = new FCExportWidget(iface, this);
96 setMainWidget(d->exportWidget);
97
** CID 1465265: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/mnt/devel/GIT/7.x/core/utilities/imageeditor/core/iofilesettings.h: 35 in ()
________________________________________________________________________________________________________
*** CID 1465265: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/mnt/devel/GIT/7.x/core/utilities/imageeditor/core/iofilesettings.h: 35 in ()
29 #include "drawdecoding.h"
30 #include "digikam_export.h"
31
32 namespace Digikam
33 {
34
>>> CID 1465265: Low impact quality (MISSING_MOVE_ASSIGNMENT)
>>> Class "Digikam::IOFileSettings" may benefit from adding a move assignment operator. See other events which show the copy assignment operator being applied to rvalue(s), where a move assignment may be faster.
35 class DIGIKAM_EXPORT IOFileSettings
36 {
37
38 public:
39
40 IOFileSettings()
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp2OAl-2Fauo86CB28HCT0-2BnD-2F6eFMYt863B1-2B0FLvU5y-2FRWSl8rMA4vGwCkGPp0f1hg-3DRZNQ_IpEMwFcbl-2BY9RHaL2m6a3nuAxB4hfm4MTniX0gHjADVHnRDchVykqU3EaYrvTevsQv86GI-2F3Qi9YjU3C21NKG8Ve0wZ0YXy653-2BvvsysPAHybH16BVxdZXadEoUP18inlev-2FPpbn5e6Iy-2FhA8kXiiBZV-2FuxwTR7JpNaPX-2Bdbsqmmy0TsFZQkxH3CY3m2L7atUObGFbdCqGNmJkMKPG-2BPXbHbVv3qfN70u0eSQ8ag9EY-3D
More information about the Digikam-devel
mailing list