docparser-1.0.11-2.fc42

List of Findings

Error: COMPILER_WARNING (CWE-590): [#def1]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/cfb/cfb.cpp:17: included_from: Included from here.
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/encoding/encoding.cpp: scope_hint: In function ‘encoding::decode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/encoding/encoding.cpp:32:24: warning[-Wfree-nonheap-object]: ‘iconv_close’ called on a pointer to an unallocated object ‘-1B’
#   32 |             iconv_close(cnv);
#      |             ~~~~~~~~~~~^~~~~
#   30|   
#   31|           if (cnv == (iconv_t)(-1)) {
#   32|->             iconv_close(cnv);
#   33|               return str;
#   34|           }

Error: COMPILER_WARNING (CWE-195): [#def2]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/cfb/cfb.cpp: scope_hint: In member function ‘std::string cfb::Cfb::getStream(const std::string&, int, bool) const’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/cfb/cfb.cpp:75:42: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} and ‘int’
#   75 |                     if (m_miniFat.size() < (offset + sectorSize))
#      |                         ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
#   73|                   do {
#   74|                       offset  = start << m_miniSectorShift;
#   75|->                     if (m_miniFat.size() < (offset + sectorSize))
#   76|                           break;
#   77|                       stream += m_miniFat.substr(offset, sectorSize);

Error: COMPILER_WARNING (CWE-195): [#def3]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/cfb/cfb.cpp:92:39: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} and ‘int’
#   92 |                     if (m_data.size() < (offset + sectorSize))
#      |                         ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
#   90|   
#   91|                       offset  = (start + 1) << m_sectorShift;
#   92|->                     if (m_data.size() < (offset + sectorSize))
#   93|                           break;
#   94|                       stream += m_data.substr(offset, sectorSize);

Error: COMPILER_WARNING (CWE-195): [#def4]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/doc/doc.cpp: scope_hint: In member function ‘virtual int doc::Doc::convert(bool, bool, char)’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/doc/doc.cpp:57:51: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} and ‘int’
#   57 |     if (tableStream.empty() || tableStream.size() < clxPos + clxSize)
#      |                                ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
#   55|       // Find necessary table
#   56|       std::string tableStream = getStream(std::to_string(whichTableStream) + "Table");
#   57|->     if (tableStream.empty() || tableStream.size() < clxPos + clxSize)
#   58|           return 2;
#   59|       Cfb::clear();

Error: COMPILER_WARNING (CWE-195): [#def5]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/docx/docx.cpp: scope_hint: In member function ‘void docx::Docx::getParagraphText(const pugi::xml_node&)’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/docx/docx.cpp:279:39: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} and ‘int’
#  279 |     if (m_maxLen > 0 && m_text.size() >= m_maxLen)
#      |                         ~~~~~~~~~~~~~~^~~~~~~~~~~
#  277|   // Paragraph
#  278|   void Docx::getParagraphText(const pugi::xml_node& xmlNode) {
#  279|->     if (m_maxLen > 0 && m_text.size() >= m_maxLen)
#  280|           return;
#  281|   

Error: COMPILER_WARNING (CWE-195): [#def6]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/docx/docx.cpp: scope_hint: In member function ‘void docx::Docx::buildList(const pugi::xml_node&)’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/docx/docx.cpp:404:22: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string<char> >::size_type’ {aka ‘long unsigned int’}
#  404 |         if (ilvl + 1 > list.size())
#      |             ~~~~~~~~~^~~~~~~~~~~~~
#  402|   
#  403|           const auto &list = m_numberingMap[numId];
#  404|->         if (ilvl + 1 > list.size())
#  405|               continue;
#  406|   

Error: COMPILER_WARNING (CWE-195): [#def7]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/book.cpp: scope_hint: In member function ‘void excel::Book::handleExternalSheet(std::string&)’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/book.cpp:520:36: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} and ‘int’
#  520 |                 while (data.size() < numRefs*6 + 2) {
#      |                        ~~~~~~~~~~~~^~~~~~~~~~~~~~~
#  518|   	if (m_biffVersion >= 80) {
#  519|   		unsigned short numRefs = readByte<unsigned short>(data, 0, 2);
#  520|-> 		while (data.size() < numRefs*6 + 2) {
#  521|   			unsigned short code;
#  522|   			unsigned short length;

Error: COMPILER_WARNING (CWE-195): [#def8]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/formula.cpp: scope_hint: In member function ‘void excel::Formula::evaluateFormula(excel::Name&, int, int)’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/formula.cpp:703:44: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<excel::Operand>::size_type’ {aka ‘long unsigned int’}
#  703 |                                 if (respos > stack.size())
#      |                                     ~~~~~~~^~~~~~~~~~~~~~
#  701|                                   if (respos < 0)
#  702|                                       respos = (int)stack.size() - respos;
#  703|->                                 if (respos > stack.size())
#  704|                                       return;
#  705|                                   auto& chosen = stack[respos];

Error: COMPILER_WARNING (CWE-195): [#def9]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/formula.cpp:724:40: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<excel::Operand>::size_type’ {aka ‘long unsigned int’}
#  724 |                             if (respos > stack.size())
#      |                                 ~~~~~~~^~~~~~~~~~~~~~
#  722|                                   respos = (int)stack.size() - respos;
#  723|   
#  724|->                             if (respos > stack.size())
#  725|                                   return;
#  726|                               auto& chosen = stack[respos];

Error: CPPCHECK_WARNING (CWE-457): [#def10]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/formula.cpp:964: error[legacyUninitvar]: Uninitialized variable: sheetIndex1
#  962|                   }
#  963|   
#  964|->                 if (dodgy || sheetIndex1 < -1) {
#  965|                       res = Operand(
#  966|                                   oUNK, {}, LEAF_RANK,

Error: COMPILER_WARNING (CWE-195): [#def11]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/formula.cpp: scope_hint: In member function ‘void excel::Formula::getExternalSheetLocalRange(int&, int&, int) const’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/formula.cpp:1263:22: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<int> >::size_type’ {aka ‘long unsigned int’}
# 1263 |         if (refIndex >= m_book->m_externalSheetInfo.size())
#      |             ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1261|   void Formula::getExternalSheetLocalRange(int& sheetIndex1, int& sheetIndex2, int refIndex) const {
# 1262|       try {
# 1263|->         if (refIndex >= m_book->m_externalSheetInfo.size())
# 1264|               throw "";
# 1265|   

Error: COMPILER_WARNING (CWE-195): [#def12]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/formula.cpp:1269:61: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘const int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’}
# 1269 |         if (std::max(refFirstSheetIndex, refLastSheetIndex) >= m_book->m_sheetMap.size())
#      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1267|           int refFirstSheetIndex = m_book->m_externalSheetInfo[refIndex][1];
# 1268|           int refLastSheetIndex  = m_book->m_externalSheetInfo[refIndex][2];
# 1269|->         if (std::max(refFirstSheetIndex, refLastSheetIndex) >= m_book->m_sheetMap.size())
# 1270|               throw "";
# 1271|   

Error: COMPILER_WARNING (CWE-563): [#def13]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp: scope_hint: In member function ‘void excel::Sheet::read()’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:160:32: warning[-Wunused-variable]: unused variable ‘rowIndex’
#  160 |                 unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#      |                                ^~~~~~~~
#  158|               if (code == XL_NUMBER) {
#  159|                   // [:14] in following stmt ignores extraneous rubbish at end of record
#  160|->                 unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#  161|                   unsigned short colIndex = m_book->readByte<unsigned short>(data, 2, 2);
#  162|                   unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);

Error: COMPILER_WARNING (CWE-563): [#def14]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:161:32: warning[-Wunused-variable]: unused variable ‘colIndex’
#  161 |                 unsigned short colIndex = m_book->readByte<unsigned short>(data, 2, 2);
#      |                                ^~~~~~~~
#  159|                   // [:14] in following stmt ignores extraneous rubbish at end of record
#  160|                   unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#  161|->                 unsigned short colIndex = m_book->readByte<unsigned short>(data, 2, 2);
#  162|                   unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);
#  163|                   double d = m_book->readByte<double>(data, 6, 8);

Error: COMPILER_WARNING (CWE-563): [#def15]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:162:32: warning[-Wunused-variable]: unused variable ‘xfIndex’
#  162 |                 unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);
#      |                                ^~~~~~~
#  160|                   unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#  161|                   unsigned short colIndex = m_book->readByte<unsigned short>(data, 2, 2);
#  162|->                 unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);
#  163|                   double d = m_book->readByte<double>(data, 6, 8);
#  164|   

Error: COMPILER_WARNING (CWE-563): [#def16]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:170:32: warning[-Wunused-variable]: unused variable ‘xfIndex’
#  170 |                 unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);
#      |                                ^~~~~~~
#  168|                   unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#  169|                   unsigned short colIndex = m_book->readByte<unsigned short>(data, 2, 2);
#  170|->                 unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);
#  171|                   int sstIndex = m_book->readByte<int>(data, 6, 4);
#  172|   

Error: COMPILER_WARNING (CWE-563): [#def17]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:181:32: warning[-Wunused-variable]: unused variable ‘rowIndex’
#  181 |                 unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#      |                                ^~~~~~~~
#  179|                   }
#  180|               } else if (code == XL_LABEL) {
#  181|->                 unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#  182|                   unsigned short colIndex = m_book->readByte<unsigned short>(data, 2, 2);
#  183|                   unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);

Error: COMPILER_WARNING (CWE-563): [#def18]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:182:32: warning[-Wunused-variable]: unused variable ‘colIndex’
#  182 |                 unsigned short colIndex = m_book->readByte<unsigned short>(data, 2, 2);
#      |                                ^~~~~~~~
#  180|               } else if (code == XL_LABEL) {
#  181|                   unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#  182|->                 unsigned short colIndex = m_book->readByte<unsigned short>(data, 2, 2);
#  183|                   unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);
#  184|                   std::string str;

Error: COMPILER_WARNING (CWE-563): [#def19]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:183:32: warning[-Wunused-variable]: unused variable ‘xfIndex’
#  183 |                 unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);
#      |                                ^~~~~~~
#  181|                   unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#  182|                   unsigned short colIndex = m_book->readByte<unsigned short>(data, 2, 2);
#  183|->                 unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);
#  184|                   std::string str;
#  185|   

Error: COMPILER_WARNING (CWE-563): [#def20]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:195:32: warning[-Wunused-variable]: unused variable ‘xfIndex’
#  195 |                 unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);
#      |                                ^~~~~~~
#  193|                   unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#  194|                   unsigned short colIndex = m_book->readByte<unsigned short>(data, 2, 2);
#  195|->                 unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);
#  196|                   int pos = 6;
#  197|                   std::string str;

Error: COMPILER_WARNING (CWE-563): [#def21]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:227:32: warning[-Wunused-variable]: unused variable ‘rowIndex’
#  227 |                 unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#      |                                ^~~~~~~~
#  225|                   m_richtextRunlistMap[{rowIndex, colIndex}] = runlist;
#  226|               } else if (code == XL_RK) {
#  227|->                 unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#  228|                   unsigned short colIndex = m_book->readByte<unsigned short>(data, 2, 2);
#  229|                   unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);

Error: COMPILER_WARNING (CWE-563): [#def22]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:228:32: warning[-Wunused-variable]: unused variable ‘colIndex’
#  228 |                 unsigned short colIndex = m_book->readByte<unsigned short>(data, 2, 2);
#      |                                ^~~~~~~~
#  226|               } else if (code == XL_RK) {
#  227|                   unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#  228|->                 unsigned short colIndex = m_book->readByte<unsigned short>(data, 2, 2);
#  229|                   unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);
#  230|                   double d = unpackRK(data.substr(6, 4));

Error: COMPILER_WARNING (CWE-563): [#def23]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:229:32: warning[-Wunused-variable]: unused variable ‘xfIndex’
#  229 |                 unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);
#      |                                ^~~~~~~
#  227|                   unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#  228|                   unsigned short colIndex = m_book->readByte<unsigned short>(data, 2, 2);
#  229|->                 unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);
#  230|                   double d = unpackRK(data.substr(6, 4));
#  231|   

Error: COMPILER_WARNING (CWE-563): [#def24]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:235:32: warning[-Wunused-variable]: unused variable ‘rowIndex’
#  235 |                 unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#      |                                ^~~~~~~~
#  233|                   //			putCell(rowIndex, colIndex, std::to_string(d), xfIndex);
#  234|               } else if (code == XL_MULRK) {
#  235|->                 unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#  236|                   unsigned short firstCol = m_book->readByte<unsigned short>(data, 2, 2);
#  237|                   unsigned short lastCol  = m_book->readByte<unsigned short>(data, (int)data.size()-2, 2);

Error: COMPILER_WARNING (CWE-563): [#def25]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:241:36: warning[-Wunused-variable]: unused variable ‘xfIndex’
#  241 |                     unsigned short xfIndex = m_book->readByte<unsigned short>(data, pos, 2);
#      |                                    ^~~~~~~
#  239|   
#  240|                   for (int i = firstCol; i <= lastCol; ++i) {
#  241|->                     unsigned short xfIndex = m_book->readByte<unsigned short>(data, pos, 2);
#  242|                       double d = unpackRK(data.substr(pos+2, 4));
#  243|                       pos += 6;

Error: COMPILER_WARNING (CWE-569): [#def26]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:255:25: warning[-Wtype-limits]: comparison is always true due to limited range of data type
#  255 |                 if (!(0 <= rowIndex && rowIndex < m_maxRowCount))
#      |                       ~~^~~~~~~~~~~
#  253|                   unsigned short flag1    = m_book->readByte<unsigned short>(data, 6, 2);
#  254|                   int flag2 = m_book->readByte<int>(data, 12, 4);
#  255|->                 if (!(0 <= rowIndex && rowIndex < m_maxRowCount))
#  256|                       continue;
#  257|   

Error: COMPILER_WARNING (CWE-563): [#def27]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:279:32: warning[-Wunused-but-set-variable]: variable ‘rowIndex’ set but not used
#  279 |                 unsigned short rowIndex;
#      |                                ^~~~~~~~
#  277|                   m_rowinfoMap[rowIndex] = rowinfo;
#  278|               } else if (code == 0x0006 || code == 0x0406 || code == 0x0206) {
#  279|->                 unsigned short rowIndex;
#  280|                   unsigned short colIndex;
#  281|                   unsigned short xfIndex;

Error: COMPILER_WARNING (CWE-563): [#def28]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:280:32: warning[-Wunused-but-set-variable]: variable ‘colIndex’ set but not used
#  280 |                 unsigned short colIndex;
#      |                                ^~~~~~~~
#  278|               } else if (code == 0x0006 || code == 0x0406 || code == 0x0206) {
#  279|                   unsigned short rowIndex;
#  280|->                 unsigned short colIndex;
#  281|                   unsigned short xfIndex;
#  282|                   unsigned short flags;

Error: COMPILER_WARNING (CWE-563): [#def29]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:281:32: warning[-Wunused-but-set-variable]: variable ‘xfIndex’ set but not used
#  281 |                 unsigned short xfIndex;
#      |                                ^~~~~~~
#  279|                   unsigned short rowIndex;
#  280|                   unsigned short colIndex;
#  281|->                 unsigned short xfIndex;
#  282|                   unsigned short flags;
#  283|                   std::string result;

Error: COMPILER_WARNING (CWE-563): [#def30]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:282:32: warning[-Wunused-but-set-variable]: variable ‘flags’ set but not used
#  282 |                 unsigned short flags;
#      |                                ^~~~~
#  280|                   unsigned short colIndex;
#  281|                   unsigned short xfIndex;
#  282|->                 unsigned short flags;
#  283|                   std::string result;
#  284|                   if (m_book->m_biffVersion >= 50) {

Error: COMPILER_WARNING (CWE-563): [#def31]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:369:32: warning[-Wunused-variable]: unused variable ‘rowIndex’
#  369 |                 unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#      |                                ^~~~~~~~
#  367|                   }
#  368|               } else if (code == XL_BOOLERR) {
#  369|->                 unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#  370|                   unsigned short colIndex = m_book->readByte<unsigned short>(data, 2, 2);
#  371|                   unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);

Error: COMPILER_WARNING (CWE-563): [#def32]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:370:32: warning[-Wunused-variable]: unused variable ‘colIndex’
#  370 |                 unsigned short colIndex = m_book->readByte<unsigned short>(data, 2, 2);
#      |                                ^~~~~~~~
#  368|               } else if (code == XL_BOOLERR) {
#  369|                   unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#  370|->                 unsigned short colIndex = m_book->readByte<unsigned short>(data, 2, 2);
#  371|                   unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);
#  372|                   unsigned char value     = m_book->readByte<unsigned char>(data, 6, 1);

Error: COMPILER_WARNING (CWE-563): [#def33]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:371:32: warning[-Wunused-variable]: unused variable ‘xfIndex’
#  371 |                 unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);
#      |                                ^~~~~~~
#  369|                   unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#  370|                   unsigned short colIndex = m_book->readByte<unsigned short>(data, 2, 2);
#  371|->                 unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);
#  372|                   unsigned char value     = m_book->readByte<unsigned char>(data, 6, 1);
#  373|                   //unsigned char hasError  = m_book->readByte<unsigned char>(data, 7, 1);

Error: COMPILER_WARNING (CWE-569): [#def34]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:391:23: warning[-Wtype-limits]: comparison is always false due to limited range of data type
#  391 |                 if (0 > firstColIndex || firstColIndex > lastColIndex || lastColIndex > 256)
#      |                     ~~^~~~~~~~~~~~~~~
#  389|                   // Note: 256 instead of 255 is a common mistake. Silently ignore non-existing
#  390|                   // 257th column in that case
#  391|->                 if (0 > firstColIndex || firstColIndex > lastColIndex || lastColIndex > 256)
#  392|                       continue;
#  393|   

Error: COMPILER_WARNING (CWE-563): [#def35]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:429:32: warning[-Wunused-variable]: unused variable ‘rowIndex’
#  429 |                 unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#      |                                ^~~~~~~~
#  427|                       continue;
#  428|   
#  429|->                 unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#  430|                   unsigned short colIndex = m_book->readByte<unsigned short>(data, 2, 2);
#  431|                   unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);

Error: COMPILER_WARNING (CWE-563): [#def36]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:430:32: warning[-Wunused-variable]: unused variable ‘colIndex’
#  430 |                 unsigned short colIndex = m_book->readByte<unsigned short>(data, 2, 2);
#      |                                ^~~~~~~~
#  428|   
#  429|                   unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#  430|->                 unsigned short colIndex = m_book->readByte<unsigned short>(data, 2, 2);
#  431|                   unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);
#  432|   

Error: COMPILER_WARNING (CWE-563): [#def37]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:431:32: warning[-Wunused-variable]: unused variable ‘xfIndex’
#  431 |                 unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);
#      |                                ^~~~~~~
#  429|                   unsigned short rowIndex = m_book->readByte<unsigned short>(data, 0, 2);
#  430|                   unsigned short colIndex = m_book->readByte<unsigned short>(data, 2, 2);
#  431|->                 unsigned short xfIndex  = m_book->readByte<unsigned short>(data, 4, 2);
#  432|   
#  433|                   //			putCell(rowIndex, colIndex, "", xfIndex);

Error: COMPILER_WARNING (CWE-457): [#def38]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp: scope_hint: In member function ‘excel::Sheet::read()’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:493:37: warning[-Wmaybe-uninitialized]: ‘savedObjectId’ may be used uninitialized
#  493 |                 if (!msTxo.m_isNull && (savedObjectId > 0)) {
#      |                     ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:150:13: note: ‘savedObjectId’ was declared here
#  150 |         int savedObjectId;
#      |             ^~~~~~~~~~~~~
#  491|                   MSTxo msTxo;
#  492|                   handleMSTxo(data, msTxo);
#  493|->                 if (!msTxo.m_isNull && (savedObjectId > 0)) {
#  494|                       msTxos[savedObjectId] = msTxo;
#  495|                       savedObjectId = -1;

Error: COMPILER_WARNING (CWE-563): [#def39]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:755:36: warning[-Wunused-variable]: unused variable ‘rowIndex’
#  755 |                     unsigned short rowIndex    = m_book->readByte<unsigned short>(data, 0, 2);
#      |                                    ^~~~~~~~
#  753|                       m_ixfe = m_book->readByte<unsigned short>(data, 0, 2);
#  754|                   else if (code == XL_NUMBER_B2) {
#  755|->                     unsigned short rowIndex    = m_book->readByte<unsigned short>(data, 0, 2);
#  756|                       unsigned short colIndex    = m_book->readByte<unsigned short>(data, 2, 2);
#  757|                       std::string cellAttributes = m_book->readByte<std::string>(data, 4, 3);

Error: COMPILER_WARNING (CWE-563): [#def40]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:756:36: warning[-Wunused-variable]: unused variable ‘colIndex’
#  756 |                     unsigned short colIndex    = m_book->readByte<unsigned short>(data, 2, 2);
#      |                                    ^~~~~~~~
#  754|                   else if (code == XL_NUMBER_B2) {
#  755|                       unsigned short rowIndex    = m_book->readByte<unsigned short>(data, 0, 2);
#  756|->                     unsigned short colIndex    = m_book->readByte<unsigned short>(data, 2, 2);
#  757|                       std::string cellAttributes = m_book->readByte<std::string>(data, 4, 3);
#  758|                       double d = m_book->readByte<unsigned short>(data, 7, 4);

Error: COMPILER_WARNING (CWE-563): [#def41]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:764:36: warning[-Wunused-variable]: unused variable ‘rowIndex’
#  764 |                     unsigned short rowIndex    = m_book->readByte<unsigned short>(data, 0, 2);
#      |                                    ^~~~~~~~
#  762|                   }
#  763|                   else if (code == XL_INTEGER) {
#  764|->                     unsigned short rowIndex    = m_book->readByte<unsigned short>(data, 0, 2);
#  765|                       unsigned short colIndex    = m_book->readByte<unsigned short>(data, 2, 2);
#  766|                       std::string cellAttributes = m_book->readByte<std::string>(data, 4, 3);

Error: COMPILER_WARNING (CWE-563): [#def42]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:765:36: warning[-Wunused-variable]: unused variable ‘colIndex’
#  765 |                     unsigned short colIndex    = m_book->readByte<unsigned short>(data, 2, 2);
#      |                                    ^~~~~~~~
#  763|                   else if (code == XL_INTEGER) {
#  764|                       unsigned short rowIndex    = m_book->readByte<unsigned short>(data, 0, 2);
#  765|->                     unsigned short colIndex    = m_book->readByte<unsigned short>(data, 2, 2);
#  766|                       std::string cellAttributes = m_book->readByte<std::string>(data, 4, 3);
#  767|                       float d = m_book->readByte<unsigned short>(data, 7, 2);

Error: COMPILER_WARNING (CWE-563): [#def43]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:773:36: warning[-Wunused-variable]: unused variable ‘rowIndex’
#  773 |                     unsigned short rowIndex    = m_book->readByte<unsigned short>(data, 0, 2);
#      |                                    ^~~~~~~~
#  771|                   }
#  772|                   else if (code == XL_LABEL_B2) {
#  773|->                     unsigned short rowIndex    = m_book->readByte<unsigned short>(data, 0, 2);
#  774|                       unsigned short colIndex    = m_book->readByte<unsigned short>(data, 2, 2);
#  775|                       std::string cellAttributes = m_book->readByte<std::string>(data, 4, 3);

Error: COMPILER_WARNING (CWE-563): [#def44]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:774:36: warning[-Wunused-variable]: unused variable ‘colIndex’
#  774 |                     unsigned short colIndex    = m_book->readByte<unsigned short>(data, 2, 2);
#      |                                    ^~~~~~~~
#  772|                   else if (code == XL_LABEL_B2) {
#  773|                       unsigned short rowIndex    = m_book->readByte<unsigned short>(data, 0, 2);
#  774|->                     unsigned short colIndex    = m_book->readByte<unsigned short>(data, 2, 2);
#  775|                       std::string cellAttributes = m_book->readByte<std::string>(data, 4, 3);
#  776|                       std::string str = m_book->unpackString(data, 7, 1);

Error: COMPILER_WARNING (CWE-563): [#def45]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:782:36: warning[-Wunused-variable]: unused variable ‘rowIndex’
#  782 |                     unsigned short rowIndex    = m_book->readByte<unsigned short>(data, 0, 2);
#      |                                    ^~~~~~~~
#  780|                   }
#  781|                   else if (code == XL_BOOLERR_B2) {
#  782|->                     unsigned short rowIndex    = m_book->readByte<unsigned short>(data, 0, 2);
#  783|                       unsigned short colIndex    = m_book->readByte<unsigned short>(data, 2, 2);
#  784|                       std::string cellAttributes = m_book->readByte<std::string>(data, 4, 3);

Error: COMPILER_WARNING (CWE-563): [#def46]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:783:36: warning[-Wunused-variable]: unused variable ‘colIndex’
#  783 |                     unsigned short colIndex    = m_book->readByte<unsigned short>(data, 2, 2);
#      |                                    ^~~~~~~~
#  781|                   else if (code == XL_BOOLERR_B2) {
#  782|                       unsigned short rowIndex    = m_book->readByte<unsigned short>(data, 0, 2);
#  783|->                     unsigned short colIndex    = m_book->readByte<unsigned short>(data, 2, 2);
#  784|                       std::string cellAttributes = m_book->readByte<std::string>(data, 4, 3);
#  785|                       unsigned char value        = m_book->readByte<unsigned char>(data, 7, 1);

Error: COMPILER_WARNING (CWE-563): [#def47]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:795:36: warning[-Wunused-variable]: unused variable ‘rowIndex’
#  795 |                     unsigned short rowIndex    = m_book->readByte<unsigned short>(data, 0, 2);
#      |                                    ^~~~~~~~
#  793|                       if (!m_book->m_addStyle)
#  794|                           continue;
#  795|->                     unsigned short rowIndex    = m_book->readByte<unsigned short>(data, 0, 2);
#  796|                       unsigned short colIndex    = m_book->readByte<unsigned short>(data, 2, 2);
#  797|                       std::string cellAttributes = m_book->readByte<std::string>(data, 4, 3);

Error: COMPILER_WARNING (CWE-563): [#def48]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:796:36: warning[-Wunused-variable]: unused variable ‘colIndex’
#  796 |                     unsigned short colIndex    = m_book->readByte<unsigned short>(data, 2, 2);
#      |                                    ^~~~~~~~
#  794|                           continue;
#  795|                       unsigned short rowIndex    = m_book->readByte<unsigned short>(data, 0, 2);
#  796|->                     unsigned short colIndex    = m_book->readByte<unsigned short>(data, 2, 2);
#  797|                       std::string cellAttributes = m_book->readByte<std::string>(data, 4, 3);
#  798|   

Error: COMPILER_WARNING (CWE-569): [#def49]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:814:29: warning[-Wtype-limits]: comparison is always true due to limited range of data type
#  814 |                     if (!(0 <= rowIndex && rowIndex < m_maxRowCount))
#      |                           ~~^~~~~~~~~~~
#  812|                       unsigned char  flag2    = m_book->readByte<unsigned char>(data, 10, 1);
#  813|   
#  814|->                     if (!(0 <= rowIndex && rowIndex < m_maxRowCount))
#  815|                           continue;
#  816|                       int xfIndex;

Error: COMPILER_WARNING (CWE-569): [#def50]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:873:27: warning[-Wtype-limits]: comparison is always false due to limited range of data type
#  873 |                     if (0 > firstColIndex || firstColIndex >= lastColIndex || lastColIndex > 256)
#      |                         ~~^~~~~~~~~~~~~~~
#  871|                       unsigned short lastColIndex  = m_book->readByte<unsigned short>(data, 2, 2);
#  872|                       // Warning: OOo docs wrong; firstColIndex <= colx < lastColIndex
#  873|->                     if (0 > firstColIndex || firstColIndex >= lastColIndex || lastColIndex > 256)
#  874|                           lastColIndex = std::min((int)lastColIndex, 256);
#  875|                       for (int i = firstColIndex; i < lastColIndex; ++i) {

Error: COMPILER_WARNING (CWE-483): [#def51]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp: scope_hint: In member function ‘void excel::Sheet::handleHyperlink(const std::string&)’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:1283:5: warning[-Wmisleading-indentation]: this ‘if’ clause does not guard...
# 1283 |     if (extraByteCount < 0)
#      |     ^~
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/sheet.cpp:1286:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
# 1286 |         m_hyperlinkList.push_back(hlink);
#      |         ^~~~~~~~~~~~~~~
# 1281|   
# 1282|   	int extraByteCount = recordSize - offset;
# 1283|->     if (extraByteCount < 0)
# 1284|           throw std::logic_error("Bug or corrupt file, send copy of input file for debugging");
# 1285|   

Error: COMPILER_WARNING (CWE-563): [#def52]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/xlsx.cpp: scope_hint: In member function ‘void excel::X12Sheet::handleRow(const pugi::xml_node&)’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/xlsx.cpp:505:17: warning[-Wunused-variable]: unused variable ‘xfIndex’
#  505 |             int xfIndex = cellNode.attribute("s").as_int()+1;
#      |                 ^~~~~~~
#  503|               }

#  504|   

#  505|->             int xfIndex = cellNode.attribute("s").as_int()+1;

#  506|               std::string cellType = cellNode.attribute("t").value();

#  507|               std::string value;


Error: CPPCHECK_WARNING (CWE-457): [#def53]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/excel/xlsx.cpp:969: error[legacyUninitvar]: Uninitialized variable: xfIndex
#  967|   	m_book->m_xfList.push_back(xf);

#  968|   	m_book->m_xfCount += 1;

#  969|-> 	m_book->m_xfIndexXlTypeMap[xfIndex] = m_isDateFormat[numFormatId] + 2;

#  970|   }

#  971|   


Error: COMPILER_WARNING (CWE-483): [#def54]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/ppt/ppt.cpp: scope_hint: In member function ‘virtual int ppt::Ppt::convert(bool, bool, char)’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/ppt/ppt.cpp:95:5: warning[-Wmisleading-indentation]: this ‘if’ clause does not guard...
#   95 |     if (ppdStream.empty())
#      |     ^~
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/ppt/ppt.cpp:97:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
#   97 |         Cfb::clear();
#      |         ^~~
#   93|   	Cfb::parse();
#   94|       std::string ppdStream = getStream("PowerPoint Document");
#   95|->     if (ppdStream.empty())
#   96|           return 3;
#   97|   	Cfb::clear();

Error: COMPILER_WARNING (CWE-195): [#def55]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/ppt/ppt.cpp: scope_hint: In member function ‘void ppt::Ppt::parseRecord(const std::string&, size_t&, int, ulong)’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/ppt/ppt.cpp:135:27: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘ulong’ {aka ‘long unsigned int’}
#  135 |         for (int i = 0; i < textLen; ++i) {
#      |                         ~~^~~~~~~~~
#  133|               textLen = (ppd.size() - offset) / 2;
#  134|   
#  135|->         for (int i = 0; i < textLen; ++i) {
#  136|               auto u = readByte<unsigned short>(ppd, offset, 2);
#  137|               offset += 2;

Error: COMPILER_WARNING (CWE-195): [#def56]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/ppt/ppt.cpp:141:57: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘ulong’ {aka ‘long unsigned int’}
#  141 |                 if (utf16_unichar_has_4_bytes(u) && ++i < textLen) {
#      |                                                     ~~~~^~~~~~~~~
#  139|                   m_text += '\n';
#  140|               } else {
#  141|->                 if (utf16_unichar_has_4_bytes(u) && ++i < textLen) {
#  142|                       auto b = readByte<unsigned short>(ppd, offset, 2);
#  143|                       offset += 2;

Error: COMPILER_WARNING (CWE-195): [#def57]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/ppt/ppt.cpp:157:27: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘ulong’ {aka ‘long unsigned int’}
#  157 |         for (int i = 0; i < textLen; ++i) {
#      |                         ~~^~~~~~~~~
#  155|               textLen = ppd.size() - offset;
#  156|   
#  157|->         for (int i = 0; i < textLen; ++i) {
#  158|               auto u = readByte<unsigned short>(ppd, offset, 1);
#  159|               ++offset;

Error: COMPILER_WARNING (CWE-563): [#def58]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/ppt/ppt.cpp: scope_hint: In member function ‘void ppt::Ppt::addParagraph(const std::string&, pugi::xml_node&) const’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/ppt/ppt.cpp:202:14: warning[-Wunused-but-set-variable]: variable ‘node’ set but not used
#  202 |         auto node = htmlNode.append_child("p");
#      |              ^~~~
#  200|   void Ppt::addParagraph(const std::string& text, pugi::xml_node& htmlNode) const {
#  201|   	/*text = html_entity_decode(iconv("windows-1251", "utf-8", text), ENT_QUOTES, "UTF-8");*/
#  202|-> 	auto node = htmlNode.append_child("p");
#  203|   //	node.append_child(pugi::node_pcdata).set_value(text.c_str());
#  204|       std::cout << text << std::endl;

Error: COMPILER_WARNING (CWE-477): [#def59]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/rtf/table.cpp:70:85: warning[-Wdeprecated-declarations]: ‘std::binder2nd<_Operation> std::bind2nd(const _Operation&, const _Tp&) [with _Operation = mem_fun1_t<bool, rtf::TableCellDef, int>; _Tp = int]’ is deprecated: use 'std::bind' instead
#   70 |                                                                         std::bind2nd(
#      |                                                                         ~~~~~~~~~~~~^
#   71 |                                                                                 std::mem_fun(&TableCellDef::rightEquals),
#      |                                                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   72 |                                                                                 (*cellDef)->m_right
#      |                                                                                 ~~~~~~~~~~~~~~~~~~~
#   73 |                                                                         )
#      |                                                                         ~            
/usr/include/c++/14/bits/stl_function.h:1435: included_from: Included from here.
/usr/include/c++/14/backward/binders.h:172:5: note: declared here
#  172 |     bind2nd(const _Operation& __fn, const _Tp& __x)
#      |     ^~~~~~~
#   68|   									(*spanRow)->m_cellDefList->begin(),
#   69|   									(*spanRow)->m_cellDefList->end(),
#   70|-> 									std::bind2nd(
#   71|   										std::mem_fun(&TableCellDef::rightEquals),
#   72|   										(*cellDef)->m_right

Error: COMPILER_WARNING (CWE-477): [#def60]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/rtf/table.cpp: scope_hint: In member function ‘void rtf::Table::make(pugi::xml_node&)’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/rtf/table.cpp:71:93: warning[-Wdeprecated-declarations]: ‘std::mem_fun1_t<_Ret, _Tp, _Arg> std::mem_fun(_Ret (_Tp::*)(_Arg)) [with _Ret = bool; _Tp = rtf::TableCellDef; _Arg = int]’ is deprecated: use 'std::mem_fn' instead
#   71 |                                                                                 std::mem_fun(&TableCellDef::rightEquals),
#      |                                                                                 ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_tree.h:65: included_from: Included from here.
/usr/include/c++/14/set:62: included_from: Included from here.
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/rtf/table.cpp:10: included_from: Included from here.
/usr/include/c++/14/bits/stl_function.h:1392:5: note: declared here
# 1392 |     mem_fun(_Ret (_Tp::*__f)(_Arg))
#      |     ^~~~~~~
#   69|   									(*spanRow)->m_cellDefList->end(),
#   70|   									std::bind2nd(
#   71|-> 										std::mem_fun(&TableCellDef::rightEquals),
#   72|   										(*cellDef)->m_right
#   73|   									)

Error: COMPILER_WARNING (CWE-195): [#def61]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/xlsb/xlsb.cpp: scope_hint: In member function ‘bool xlsb::Xlsb::readNum(uint32_t&, int)’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/xlsb/xlsb.cpp:86:37: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} and ‘int’
#   86 |     if (m_buffer.size() - m_pointer < bytes)
#      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
#   84|   {
#   85|       value = 0;
#   86|->     if (m_buffer.size() - m_pointer < bytes)
#   87|           return false;
#   88|   

Error: COMPILER_WARNING (CWE-195): [#def62]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/xlsb/xlsb.cpp: scope_hint: In member function ‘bool xlsb::Xlsb::readXlWideStr(std::string&)’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/xlsb/xlsb.cpp:162:23: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’}
#  162 |     for (int i = 0; i < strSize; ++i) {
#      |                     ~~^~~~~~~~~
#  160|   
#  161|       str.reserve(2 * strSize);
#  162|->     for (int i = 0; i < strSize; ++i) {
#  163|           unsigned int uc = *((unsigned short*)&m_buffer[m_pointer]);
#  164|           m_pointer += 2;

Error: COMPILER_WARNING (CWE-195): [#def63]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/xlsb/xlsb.cpp:167:25: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’}
#  167 |                 if (++i >= strSize) {
#      |                     ~~~~^~~~~~~~~~
#  165|           if (uc != 0) {
#  166|               if (utf16UnicharHas4Bytes(uc)) {
#  167|->                 if (++i >= strSize) {
#  168|                       return false;
#  169|                   }

Error: COMPILER_WARNING (CWE-195): [#def64]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/xlsb/xlsb.cpp: scope_hint: In member function ‘bool xlsb::Xlsb::readRichStr(std::string&)’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/xlsb/xlsb.cpp:182:25: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} and ‘int’
#  182 |     if (m_buffer.size() == m_pointer)
#      |         ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
#  180|   bool Xlsb::readRichStr(std::string &str)
#  181|   {
#  182|->     if (m_buffer.size() == m_pointer)
#  183|           return false;
#  184|   

Error: COMPILER_WARNING (CWE-563): [#def65]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/xlsb/xlsb.cpp: scope_hint: In member function ‘bool xlsb::Xlsb::readRecord(Record&)’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/xlsb/xlsb.cpp:206:9: warning[-Wunused-variable]: unused variable ‘a’
#  206 |     int a = m_buffer.length();
#      |         ^
#  204|       }
#  205|   
#  206|->     int a = m_buffer.length();
#  207|       for (int i = 0; i < 4 && m_readed <= m_buffer.size(); ++i)	//read record size
#  208|       {

Error: COMPILER_WARNING (CWE-195): [#def66]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/xlsb/xlsb.cpp: scope_hint: In member function ‘bool xlsb::Xlsb::parseRecordForWorksheets(Record&, std::string&)’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/fileext/xlsb/xlsb.cpp:303:38: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’}
#  303 |         for (int i = m_currentRow; i < row; ++i)
#      |                                    ~~^~~~~
#  301|           if (!readUint32(row))
#  302|               return false;
#  303|->         for (int i = m_currentRow; i < row; ++i)
#  304|               text += "\n";
#  305|           m_currentRow = row;

Error: COMPILER_WARNING (CWE-252): [#def67]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/tools.cpp: scope_hint: In function ‘std::string tools::absolutePath(const std::string&)’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/tools.cpp:64:25: warning[-Wunused-result]: ignoring return value of ‘char* realpath(const char*, char*)’ declared with attribute ‘warn_unused_result’
#   64 |                 realpath(fileName.c_str(), fullPath);
#      |                 ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   62|   	std::string absolutePath(const std::string &fileName) {
#   63|   		char fullPath[PATH_MAX];
#   64|-> 		realpath(fileName.c_str(), fullPath);
#   65|   		return fullPath;
#   66|   	}

Error: COMPILER_WARNING (CWE-252): [#def68]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/tools.cpp: scope_hint: In function ‘std::string tools::getProgramPath()’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/libs/tools.cpp:76:15: warning[-Wunused-result]: ignoring return value of ‘char* tools::getcwd(char*, size_t)’ declared with attribute ‘warn_unused_result’
#   76 |         getcwd(currentPath, sizeof(currentPath));
#      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   74|   std::string getProgramPath() {
#   75|   	char currentPath[FILENAME_MAX];
#   76|-> 	getcwd(currentPath, sizeof(currentPath));
#   77|   	return currentPath;
#   78|   }

Error: COMPILER_WARNING (CWE-457): [#def69]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/utils/libofd/utils/tinyxml2.cc: scope_hint: In function ‘parsePhysicalBoxElement(tinyxml2::XMLElement const*)’
docparser-1.0.11-build/docparser-1.0.11/3rdparty/utils/libofd/utils/tinyxml2.cc:28:12: warning[-Wmaybe-uninitialized]: ‘x0’ may be used uninitialized
#   28 |     double x0, y0, x1, y1 = 0.0;
#      |            ^~
#   26|   std::tuple<double, double, double, double, bool> parsePhysicalBoxElement(const XMLElement *physicalBoxElement)
#   27|   {
#   28|->     double x0, y0, x1, y1 = 0.0;
#   29|       bool ok = false;
#   30|   

Error: COMPILER_WARNING (CWE-457): [#def70]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/utils/libofd/utils/tinyxml2.cc:28:16: warning[-Wmaybe-uninitialized]: ‘y0’ may be used uninitialized
#   28 |     double x0, y0, x1, y1 = 0.0;
#      |                ^~
#   26|   std::tuple<double, double, double, double, bool> parsePhysicalBoxElement(const XMLElement *physicalBoxElement)
#   27|   {
#   28|->     double x0, y0, x1, y1 = 0.0;
#   29|       bool ok = false;
#   30|   

Error: COMPILER_WARNING (CWE-457): [#def71]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/utils/libofd/utils/tinyxml2.cc:28:20: warning[-Wmaybe-uninitialized]: ‘x1’ may be used uninitialized
#   28 |     double x0, y0, x1, y1 = 0.0;
#      |                    ^~
#   26|   std::tuple<double, double, double, double, bool> parsePhysicalBoxElement(const XMLElement *physicalBoxElement)
#   27|   {
#   28|->     double x0, y0, x1, y1 = 0.0;
#   29|       bool ok = false;
#   30|   

Error: CPPCHECK_WARNING (CWE-672): [#def72]
docparser-1.0.11-build/docparser-1.0.11/3rdparty/utils/libofd/utils/zip.cc:130: error[deallocret]: Returning/dereferencing 'content' after it is deallocated / released
#  128|       }
#  129|   
#  130|->     return std::make_tuple(content, filesize, ok);
#  131|   }
#  132|   

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-207.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namedocparser-1.0.11-2.fc42
store-results-to/tmp/tmpat3nur5j/docparser-1.0.11-2.fc42.tar.xz
time-created2024-11-12 23:52:02
time-finished2024-11-12 23:53:44
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpat3nur5j/docparser-1.0.11-2.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpat3nur5j/docparser-1.0.11-2.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9