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. New defect(s) Reported-by: Coverity Scan Showing 8 of 8 defect(s) ** CID 1466694: Error handling issues (CHECKED_RETURN) /mnt/devel/GIT/7.x/core/dplugins/generic/metadata/metadataedit/xmp/xmpcredits.cpp: 335 in DigikamGenericMetadataEditPlugin::XMPCredits::getXMPByLine() const() ________________________________________________________________________________________________________ *** CID 1466694: Error handling issues (CHECKED_RETURN) /mnt/devel/GIT/7.x/core/dplugins/generic/metadata/metadataedit/xmp/xmpcredits.cpp: 335 in DigikamGenericMetadataEditPlugin::XMPCredits::getXMPByLine() const() 329 d->syncEXIFArtistCheck->setChecked(c); 330 } 331 332 QString XMPCredits::getXMPByLine() const 333 { 334 QStringList oldv, newv; >>> CID 1466694: Error handling issues (CHECKED_RETURN) >>> Calling "getValues" without checking return value (as is done elsewhere 6 out of 7 times). 335 d->bylineEdit->getValues(oldv, newv); 336 337 return (newv.join(QLatin1Char(';'))); 338 } 339 340 void XMPCredits::readMetadata(QByteArray& xmpData) ** CID 1466693: Incorrect expression (DIVIDE_BY_ZERO) /mnt/devel/GIT/7.x/core/tests/facesengine/benchmark_recognition.cpp: 455 in Benchmark::splitData(const QDir &, float)() ________________________________________________________________________________________________________ *** CID 1466693: Incorrect expression (DIVIDE_BY_ZERO) /mnt/devel/GIT/7.x/core/tests/facesengine/benchmark_recognition.cpp: 455 in Benchmark::splitData(const QDir &, float)() 449 } 450 } 451 } 452 453 unsigned int elapsedDetection = timer.elapsed(); 454 >>> CID 1466693: Incorrect expression (DIVIDE_BY_ZERO) >>> In expression "(float)elapsedDetection / nbData", division by expression "nbData" which may be zero has undefined behavior. 455 qDebug() << "Fetched dataset with" << nbData << "samples, with average" << float(elapsedDetection)/nbData << "ms/image.";; 456 } 457 458 void Benchmark::fetchData() 459 { 460 if (! m_parser->isSet(QLatin1String("dataset"))) ** CID 1466692: Incorrect expression (DIVIDE_BY_ZERO) /mnt/devel/GIT/7.x/core/tests/facesengine/benchmark_recognition.cpp: 197 in Benchmark::registerTrainingSet()() ________________________________________________________________________________________________________ *** CID 1466692: Incorrect expression (DIVIDE_BY_ZERO) /mnt/devel/GIT/7.x/core/tests/facesengine/benchmark_recognition.cpp: 197 in Benchmark::registerTrainingSet()() 191 192 m_trainSize += iter.value().size(); 193 } 194 195 unsigned int elapsedDetection = timer.elapsed(); 196 >>> CID 1466692: Incorrect expression (DIVIDE_BY_ZERO) >>> In expression "(float)elapsedDetection / this->m_trainSize", division by expression "this->m_trainSize" which may be zero has undefined behavior. 197 qDebug() << "Registered << :" << m_trainSize 198 << "faces in training set, with average" 199 << float(elapsedDetection) / m_trainSize << "ms/face"; 200 } 201 202 void Benchmark::verifyTestSet() ** 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 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() ** CID 1463642: Low impact quality (MISSING_MOVE_ASSIGNMENT) /mnt/devel/GIT/7.x/core/dplugins/generic/webservices/vkontakte/backend/vkontakte_albuminfo.h: 36 in () ________________________________________________________________________________________________________ *** CID 1463642: Low impact quality (MISSING_MOVE_ASSIGNMENT) /mnt/devel/GIT/7.x/core/dplugins/generic/webservices/vkontakte/backend/vkontakte_albuminfo.h: 36 in () 30 #include <QSharedDataPointer> 31 32 namespace Vkontakte 33 { 34 35 // https://u15810271.ct.sendgrid.net/ls/click?upn=CTPegkVN6peWFCMEieYYmG2T7BdRx2x2A1fUgreVtM-2BaI-2FiGy9lnCWZ20hAwSyZoPzbA_IpEMwFcbl-2BY9RHaL2m6a3nuAxB4hfm4MTniX0gHjADU3AOLsUfXIFsJhARdn9S0-2F2ShuCUiwagUyJZUbRmaogKjoGiILO1nyRvUOcioehNLljnbaV2gU5m1bPpJhnG7PPGNBilXdtPA8WsMx77dQcu1ff-2FRykQE2Hc8qdv8m3snLbdXaug73CtwAhur-2BpOo-2BFxODN-2Bd0eVHM0iBWL5Gay6xiGUKZLYtRewq7dyZrfaQ-3D >>> CID 1463642: Low impact quality (MISSING_MOVE_ASSIGNMENT) >>> Class "Vkontakte::AlbumInfo" 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. 36 class AlbumInfo 37 { 38 public: 39 40 enum 41 { ** CID 1406231: Error handling issues (UNCAUGHT_EXCEPT) /mnt/devel/GIT/7.x/core/app/main/main.cpp: 96 in main() ________________________________________________________________________________________________________ *** CID 1406231: Error handling issues (UNCAUGHT_EXCEPT) /mnt/devel/GIT/7.x/core/app/main/main.cpp: 96 in main() 90 # include <shellapi.h> 91 # include <objbase.h> 92 #endif 93 94 using namespace Digikam; 95 >>> CID 1406231: Error handling issues (UNCAUGHT_EXCEPT) >>> In function "main(int, char **)" an exception of type "std::invalid_argument" is thrown and never caught. 96 int main(int argc, char* argv[]) 97 { 98 SystemSettings system(QLatin1String("digikam")); 99 system.readSettings(); 100 101 QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, ________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp2OAl-2Fauo86CB28HCT0-2BnD-2F6eFMYt863B1-2B0FLvU5y-2FRWSl8rMA4vGwCkGPp0f1hg-3DKXNK_IpEMwFcbl-2BY9RHaL2m6a3nuAxB4hfm4MTniX0gHjADU3AOLsUfXIFsJhARdn9S0-2FWlKO3mXCP9jLtwS3vib3XYXPUVPdRn2R3vyp74hmd1-2FJnvSyFAC20IEI-2BXC5tISnx9XRWM9-2FGG2m4QZC6rANsn8-2F1wFH58YV91crwusxE566DgrbpWgmLuxqomFEGlTA4S8Y07q29UvLVZxvH2Ide-2BxfJn43tuqllkPOTiMp5lA-3D |
Free forum by Nabble | Edit this page |