New Defects reported by Coverity Scan for digiKam

scan-admin at coverity.com scan-admin at coverity.com
Tue Aug 30 10:03:23 BST 2022


Hi,

Please find the latest report on new defect(s) introduced to digiKam found with Coverity Scan.

4 new defect(s) introduced to digiKam found with Coverity Scan.
380 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 4 of 4 defect(s)


** CID 1512560:    (AUTO_CAUSES_COPY)
/home/gilles/Documents/8.x/core/dplugins/generic/webservices/inaturalist/inatwindow.cpp: 978 in DigikamGenericINatPlugin::INatWindow::slotNearbyPlaces(const QStringList &)()
/home/gilles/Documents/8.x/core/dplugins/generic/webservices/inaturalist/inatwindow.cpp: 966 in DigikamGenericINatPlugin::INatWindow::slotNearbyPlaces(const QStringList &)()


________________________________________________________________________________________________________
*** CID 1512560:    (AUTO_CAUSES_COPY)
/home/gilles/Documents/8.x/core/dplugins/generic/webservices/inaturalist/inatwindow.cpp: 978 in DigikamGenericINatPlugin::INatWindow::slotNearbyPlaces(const QStringList &)()
972                 // Keep previous selection if it is still an option.
973     
974                 d->placesComboBox->setCurrentText(selected);
975             }
976         }
977     
>>>     CID 1512560:    (AUTO_CAUSES_COPY)
>>>     Using the "auto" keyword without an "&" causes the copy of an object of type QString.
978         for (auto place : places)
979         {
980             d->placesComboBox->addItem(place);
981     
982             if (place == selected)
983             {
/home/gilles/Documents/8.x/core/dplugins/generic/webservices/inaturalist/inatwindow.cpp: 966 in DigikamGenericINatPlugin::INatWindow::slotNearbyPlaces(const QStringList &)()
960         qCDebug(DIGIKAM_WEBSERVICES_LOG) << "Received" << places.count() <<
961             "nearby places," << d->editedPlaces.count() << "edited places.";
962     
963         QString selected = d->placesComboBox->currentText();
964         d->placesComboBox->clear();
965     
>>>     CID 1512560:    (AUTO_CAUSES_COPY)
>>>     Using the "auto" keyword without an "&" causes the copy of an object of type QString.
966         for (auto place : d->editedPlaces)
967         {
968             d->placesComboBox->addItem(place);
969     
970             if (place == selected)
971             {

** CID 1512559:  Error handling issues  (CHECKED_RETURN)
/home/gilles/Documents/8.x/core/dplugins/generic/webservices/inaturalist/inatwindow.cpp: 408 in DigikamGenericINatPlugin::INatWindow::switchUser(bool)()


________________________________________________________________________________________________________
*** CID 1512559:  Error handling issues  (CHECKED_RETURN)
/home/gilles/Documents/8.x/core/dplugins/generic/webservices/inaturalist/inatwindow.cpp: 408 in DigikamGenericINatPlugin::INatWindow::switchUser(bool)()
402     
403         QPointer<INatBrowserDlg> dlg = new INatBrowserDlg(userName, cookies, this);
404     
405         connect(dlg, SIGNAL(signalApiToken(QString,QList<QNetworkCookie>)),
406                 d->talker, SLOT(slotApiToken(QString,QList<QNetworkCookie>)));
407     
>>>     CID 1512559:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "exec" without checking return value (as is done elsewhere 33 out of 35 times).
408         dlg->exec();
409     }
410     
411     void INatWindow::slotApiTokenExpires()
412     {
413         switchUser(false);

** CID 1512558:  Performance inefficiencies  (AUTO_CAUSES_COPY)
/home/gilles/Documents/8.x/core/dplugins/generic/webservices/inaturalist/inatwindow.cpp: 1057 in DigikamGenericINatPlugin::INatWindow::slotImageListChanged()()


________________________________________________________________________________________________________
*** CID 1512558:  Performance inefficiencies  (AUTO_CAUSES_COPY)
/home/gilles/Documents/8.x/core/dplugins/generic/webservices/inaturalist/inatwindow.cpp: 1057 in DigikamGenericINatPlugin::INatWindow::slotImageListChanged()()
1051         double    latitude    = 0.0;
1052         double    longitude   = 0.0;
1053         QDateTime observationTime;
1054     
1055         DItemsListView* const listView = d->widget->d->imglst->listView();
1056     
>>>     CID 1512558:  Performance inefficiencies  (AUTO_CAUSES_COPY)
>>>     Using the "auto" keyword without an "&" causes the copy of an object of type QUrl.
1057         for (auto url : d->imglst->imageUrls())
1058         {
1059             if (url.isEmpty())
1060             {
1061                 continue;
1062             }

** CID 1512557:  Error handling issues  (CHECKED_RETURN)
/home/gilles/Documents/8.x/core/dplugins/generic/webservices/google/gswindow.cpp: 706 in DigikamGenericGoogleServicesPlugin::GSWindow::uploadNextPhoto()()


________________________________________________________________________________________________________
*** CID 1512557:  Error handling issues  (CHECKED_RETURN)
/home/gilles/Documents/8.x/core/dplugins/generic/webservices/google/gswindow.cpp: 706 in DigikamGenericGoogleServicesPlugin::GSWindow::uploadNextPhoto()()
700     
701                         default:
702                         {
703                             QPointer<ReplaceDialog> dlg = new ReplaceDialog(this, QLatin1String(""),
704                                                                             d->iface, pathComments.first,
705                                                                             info.thumbURL);
>>>     CID 1512557:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "exec" without checking return value (as is done elsewhere 33 out of 35 times).
706                             dlg->exec();
707     
708                             switch (dlg->getResult())
709                             {
710                                 case PWR_ADD_ALL:
711                                     d->renamingOpt = PWR_ADD_ALL;


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp2OAl-2Fauo86CB28HCT0-2BnD-2F6eFMYt863B1-2B0FLvU5y-2FRWSl8rMA4vGwCkGPp0f1hg-3DFTpZ_IpEMwFcbl-2BY9RHaL2m6a3nuAxB4hfm4MTniX0gHjADW47ORV0RfC8a-2BOSTfugHq97ZdZT-2FL76-2F0G5yin11ljnaxb2-2BG4O5nhR7avyuFM4oKwgs-2FLOF6AWDGlqLb9d45rhLFe7en938UY8nqM8j4lTOQP-2FmwAsbmc8kUwB3N1jUpNwvcPMVkTbKsX-2B9kM9M4r83LQoU999Ysr4JvYK6LtMQ-3D-3D



More information about the Digikam-devel mailing list