New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Thu Jul 8 21:07:52 UTC 2021


Hi,

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

1 new defect(s) introduced to LibreOffice found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)


** CID 1487029:  Incorrect expression  (IDENTICAL_BRANCHES)
/sc/source/filter/xml/XMLExportDatabaseRanges.cxx: 484 in <unnamed>::WriteDatabaseRange::writeCondition(const ScQueryEntry &, int, bool, utl::SearchParam::SearchType)()


________________________________________________________________________________________________________
*** CID 1487029:  Incorrect expression  (IDENTICAL_BRANCHES)
/sc/source/filter/xml/XMLExportDatabaseRanges.cxx: 484 in <unnamed>::WriteDatabaseRange::writeCondition(const ScQueryEntry &, int, bool, utl::SearchParam::SearchType)()
478             {
479                 // Multi-item condition.
480                 assert( rItems.size() > 1 && "rItems should have more than 1 element");
481     
482                 // Store the 1st value for backward compatibility.
483                 const ScQueryEntry::Item& rItem = rItems.front();
>>>     CID 1487029:  Incorrect expression  (IDENTICAL_BRANCHES)
>>>     The same code is executed regardless of whether "rItem.meType == ScQueryEntry::ByValue" is true, because the 'then' and 'else' branches are identical. Should one of the branches be modified, or the entire 'if' statement replaced?
484                 if (rItem.meType == ScQueryEntry::ByValue)
485                 {
486                     mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_VALUE, rItem.maString.getString());
487                 }
488                 else
489                 {


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DwOnx_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJin9-2B-2BJqbuhkYr2oOcNx6-2FYQ6uI15Xuvwlqpxw-2BVUXWujt-2FnTQJMvadxq4-2FpPkbEz7lqKSezKmLxEowyBaU-2Fzyc7DaF1aOCNjcSuHM8Iba32rabAFlsI7QmHuH-2BqcqZZOvsxE0cIDGRbDEUo44TrSu4w-2BtGWVka-2FKjdW-2F70MaeDvo-3D



More information about the LibreOffice mailing list