cmake-3.30.5-1.fc42

List of Findings

Error: COMPILER_WARNING: [#def1]
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmCTestResourceGroupsLexer.cxx:688:8: warning[-Wodr]: type ‘struct yyguts_t’ violates the C++ One Definition Rule
#  688 | struct yyguts_t
#      |        ^
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmCommandArgumentLexer.cxx:694: note: a different type is defined in another translation unit
#  694 | struct yyguts_t
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmCTestResourceGroupsLexer.cxx:692:19: note: the first difference of corresponding definitions is field ‘yyextra_r’
#  692 |     YY_EXTRA_TYPE yyextra_r;
#      |                   ^
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmCommandArgumentLexer.cxx:698: note: a field of same name but different type is defined in another translation unit
#  698 |     YY_EXTRA_TYPE yyextra_r;
cmake-3.30.5-build/cmake-3.30.5/Source/CTest/cmCTestResourceGroupsLexerHelper.h:10:7: note: type name ‘cmCTestResourceGroupsLexerHelper’ should match type name ‘cmCommandArgumentParserHelper’
#   10 | class cmCTestResourceGroupsLexerHelper
#      |       ^
cmake-3.30.5-build/cmake-3.30.5/Source/cmCommandArgumentParserHelper.h:13:7: note: the incompatible type is defined here
#   13 | class cmCommandArgumentParserHelper
#      |       ^
#  686|   
#  687|   /* Holds the entire state of the reentrant scanner. */
#  688|-> struct yyguts_t
#  689|       {
#  690|   

Error: COMPILER_WARNING: [#def2]
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmCommandArgumentLexer.cxx:694: warning[-Wodr]: type ‘struct yyguts_t’ violates the C++ One Definition Rule
#  694 | struct yyguts_t
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmExprLexer.cxx:690: note: a different type is defined in another translation unit
#  690 | struct yyguts_t
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmCommandArgumentLexer.cxx:698: note: the first difference of corresponding definitions is field ‘yyextra_r’
#  698 |     YY_EXTRA_TYPE yyextra_r;
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmExprLexer.cxx:694: note: a field of same name but different type is defined in another translation unit
#  694 |     YY_EXTRA_TYPE yyextra_r;
cmake-3.30.5-build/cmake-3.30.5/Source/cmCommandArgumentParserHelper.h:13:7: note: type name ‘cmCommandArgumentParserHelper’ should match type name ‘cmExprParserHelper’
#   13 | class cmCommandArgumentParserHelper
#      |       ^
cmake-3.30.5-build/cmake-3.30.5/Source/cmExprParserHelper.h:12:7: note: the incompatible type is defined here
#   12 | class cmExprParserHelper
#      |       ^
#  692|   
#  693|   /* Holds the entire state of the reentrant scanner. */
#  694|-> struct yyguts_t
#  695|       {
#  696|   

Error: COMPILER_WARNING: [#def3]
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmCommandArgumentParserTokens.h:51: warning[-Wodr]: type ‘yytokentype’ violates the C++ One Definition Rule
#   51 |   enum yytokentype
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmExprParserTokens.h:51: note: an enum with different value name is defined in another translation unit
#   51 |   enum yytokentype
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmCommandArgumentParserTokens.h:57: note: name ‘cal_ENVCURLY’ differs from name ‘exp_PLUS’ defined in another translation unit
#   57 |     cal_ENVCURLY = 258,            /* cal_ENVCURLY  */
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmExprParserTokens.h:57: note: mismatching definition
#   57 |     exp_PLUS = 258,                /* exp_PLUS  */
#   49|   #ifndef YYTOKENTYPE
#   50|   # define YYTOKENTYPE
#   51|->   enum yytokentype
#   52|     {
#   53|       YYEMPTY = -2,

Error: COMPILER_WARNING: [#def4]
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmExprLexer.cxx:690: warning[-Wodr]: type ‘struct yyguts_t’ violates the C++ One Definition Rule
#  690 | struct yyguts_t
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmFortranLexer.cxx:878: note: a different type is defined in another translation unit
#  878 | struct yyguts_t
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmExprLexer.cxx:694: note: the first difference of corresponding definitions is field ‘yyextra_r’
#  694 |     YY_EXTRA_TYPE yyextra_r;
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmFortranLexer.cxx:882: note: a field of same name but different type is defined in another translation unit
#  882 |     YY_EXTRA_TYPE yyextra_r;
cmake-3.30.5-build/cmake-3.30.5/Source/cmExprParserHelper.h:12:7: note: type name ‘cmExprParserHelper’ should match type name ‘cmFortranParser_s’
#   12 | class cmExprParserHelper
#      |       ^
#  688|   
#  689|   /* Holds the entire state of the reentrant scanner. */
#  690|-> struct yyguts_t
#  691|       {
#  692|   

Error: COMPILER_WARNING: [#def5]
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmFortranLexer.cxx:878: warning[-Wodr]: type ‘struct yyguts_t’ violates the C++ One Definition Rule
#  878 | struct yyguts_t
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmCommandArgumentLexer.cxx:694: note: a different type is defined in another translation unit
#  694 | struct yyguts_t
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmFortranLexer.cxx:882: note: the first difference of corresponding definitions is field ‘yyextra_r’
#  882 |     YY_EXTRA_TYPE yyextra_r;
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmCommandArgumentLexer.cxx:698: note: a field of same name but different type is defined in another translation unit
#  698 |     YY_EXTRA_TYPE yyextra_r;
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmFortranLexer.cxx:878: note: type name ‘cmFortranParser_s’ should match type name ‘cmCommandArgumentParserHelper’
#  878 | struct yyguts_t
cmake-3.30.5-build/cmake-3.30.5/Source/cmCommandArgumentParserHelper.h:13:7: note: the incompatible type is defined here
#   13 | class cmCommandArgumentParserHelper
#      |       ^
#  876|   
#  877|   /* Holds the entire state of the reentrant scanner. */
#  878|-> struct yyguts_t
#  879|       {
#  880|   

Error: COMPILER_WARNING: [#def6]
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmFortranParserTokens.h:51: warning[-Wodr]: type ‘yytokentype’ violates the C++ One Definition Rule
#   51 |   enum yytokentype
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmCommandArgumentParserTokens.h:51: note: an enum with different value name is defined in another translation unit
#   51 |   enum yytokentype
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmFortranParserTokens.h:57: note: name ‘EOSTMT’ differs from name ‘cal_ENVCURLY’ defined in another translation unit
#   57 |     EOSTMT = 258,                  /* EOSTMT  */
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmCommandArgumentParserTokens.h:57: note: mismatching definition
#   57 |     cal_ENVCURLY = 258,            /* cal_ENVCURLY  */
#   49|   #ifndef YYTOKENTYPE
#   50|   # define YYTOKENTYPE
#   51|->   enum yytokentype
#   52|     {
#   53|       YYEMPTY = -2,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c: scope_hint: In function ‘cmListFileLexer_yy_create_buffer’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1924:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1032:1: note: in expansion of macro ‘YY_DECL’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1057:25: note: in expansion of macro ‘yyensure_buffer_stack’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1057:25: note: in expansion of macro ‘yyensure_buffer_stack’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:2068:13: note: in expansion of macro ‘yyensure_buffer_stack’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1057:25: note: in expansion of macro ‘yyensure_buffer_stack’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1059:33: note: in expansion of macro ‘yy_create_buffer’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1910:21: note: in expansion of macro ‘yy_create_buffer’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1914:31: note: in expansion of macro ‘yyalloc’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c: scope_hint: In function ‘cmListFileLexer_yy_create_buffer’
# 1922|   	 */
# 1923|   	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 1924|-> 	if ( ! b->yy_ch_buf )
# 1925|   		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
# 1926|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c: scope_hint: In function ‘cmListFileLexer_yy_init_buffer’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1966:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1032:1: note: in expansion of macro ‘YY_DECL’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1618:25: note: in expansion of macro ‘yyrestart’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1618:25: note: in expansion of macro ‘yyrestart’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1845:10: note: in expansion of macro ‘yyrestart’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1850:9: note: in expansion of macro ‘yyensure_buffer_stack’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:2068:13: note: in expansion of macro ‘yyensure_buffer_stack’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:2080:66: note: in expansion of macro ‘yyalloc’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c: scope_hint: In function ‘cmListFileLexer_yy_init_buffer’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1850:9: note: in expansion of macro ‘yyensure_buffer_stack’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1852:13: note: in expansion of macro ‘yy_create_buffer’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1910:21: note: in expansion of macro ‘yy_create_buffer’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1929:9: note: in expansion of macro ‘yy_init_buffer’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1958:17: note: in expansion of macro ‘yy_init_buffer’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1964:9: note: in expansion of macro ‘yy_flush_buffer’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1987:10: note: in expansion of macro ‘yy_flush_buffer’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:2007:19: note: in expansion of macro ‘YY_CURRENT_BUFFER’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:2007:19: note: in expansion of macro ‘YY_CURRENT_BUFFER’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:2007:19: note: in expansion of macro ‘YY_CURRENT_BUFFER’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1964:9: note: in expansion of macro ‘yy_flush_buffer’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1973:14: note: in expansion of macro ‘YY_CURRENT_BUFFER’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1973:14: note: in expansion of macro ‘YY_CURRENT_BUFFER’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1973:14: note: in expansion of macro ‘YY_CURRENT_BUFFER’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1929:9: note: in expansion of macro ‘yy_init_buffer’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1852:13: note: in expansion of macro ‘yy_create_buffer’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1855:9: note: in expansion of macro ‘yy_init_buffer’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1855:9: note: in expansion of macro ‘yy_init_buffer’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1855:9: note: in expansion of macro ‘yy_init_buffer’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1958:17: note: in expansion of macro ‘yy_init_buffer’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1964:9: note: in expansion of macro ‘yy_flush_buffer’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1987:10: note: in expansion of macro ‘yy_flush_buffer’
cmake-3.30.5-build/cmake-3.30.5/Source/LexerParser/cmListFileLexer.c:1964:9: note: in expansion of macro ‘yy_flush_buffer’
# 1964|   	yy_flush_buffer( b , yyscanner);
# 1965|   
# 1966|-> 	b->yy_input_file = file;
# 1967|   	b->yy_fill_buffer = 1;
# 1968|   

Error: CPPCHECK_WARNING (CWE-398): [#def9]
cmake-3.30.5-build/cmake-3.30.5/Source/cmDebuggerBreakpointManager.cxx:91: error[containerOutOfBounds]: Out of bounds access in expression 'breakpoints[i]' because 'breakpoints' is empty.
#   89|       for (size_t i = 0; i < breakpoints.size(); i++) {
#   90|         int64_t correctedLine =
#   91|->         CalibrateBreakpointLine(sourcePath, breakpoints[i].line);
#   92|         if (correctedLine > 0) {
#   93|           Breakpoints[sourcePath].emplace_back(NextBreakpointId++,

Error: CPPCHECK_WARNING (CWE-398): [#def10]
cmake-3.30.5-build/cmake-3.30.5/Source/cmDebuggerBreakpointManager.cxx:101: error[containerOutOfBounds]: Out of bounds access in expression 'breakpoints[i]' because 'breakpoints' is empty.
#   99|         } else {
#  100|           response.breakpoints[i].verified = false;
#  101|->         response.breakpoints[i].line = breakpoints[i].line;
#  102|         }
#  103|         dap::Source dapSrc;

Error: CPPCHECK_WARNING (CWE-398): [#def11]
cmake-3.30.5-build/cmake-3.30.5/Source/cmDebuggerBreakpointManager.cxx:113: error[containerOutOfBounds]: Out of bounds access in expression 'breakpoints[i]' because 'breakpoints' is empty.
#  111|       for (size_t i = 0; i < breakpoints.size(); i++) {
#  112|         Breakpoints[sourcePath].emplace_back(NextBreakpointId++,
#  113|->                                            breakpoints[i].line);
#  114|         response.breakpoints[i].id = Breakpoints[sourcePath].back().GetId();
#  115|         response.breakpoints[i].line = Breakpoints[sourcePath].back().GetLine();

Error: CPPCHECK_WARNING (CWE-664): [#def12]
cmake-3.30.5-build/cmake-3.30.5/Source/cmFindPackageCommand.cxx:564: error[mismatchingContainerIterator]: Iterator 'labels->begin()' referring to container 'this->PathGroupLabelMap[PathGroup::All]' is used with container 'labels'.
#  562|     std::vector<cmFindCommon::PathLabel>* const labels =
#  563|       &this->PathGroupLabelMap[PathGroup::All];
#  564|->   labels->insert(labels->begin(), PathLabel::PackageRedirect);
#  565|     labels->insert(
#  566|       std::find(labels->begin(), labels->end(), PathLabel::CMakeSystem),

Error: CPPCHECK_WARNING (CWE-664): [#def13]
cmake-3.30.5-build/cmake-3.30.5/Source/cmFindPackageCommand.cxx:565: error[mismatchingContainerIterator]: Iterator 'std::find(labels->begin(),labels->end(),PathLabel::CMakeSystem)' referring to container 'this->PathGroupLabelMap[PathGroup::All]' is used with container 'labels'.
#  563|       &this->PathGroupLabelMap[PathGroup::All];
#  564|     labels->insert(labels->begin(), PathLabel::PackageRedirect);
#  565|->   labels->insert(
#  566|       std::find(labels->begin(), labels->end(), PathLabel::CMakeSystem),
#  567|       PathLabel::UserRegistry);

Error: CPPCHECK_WARNING (CWE-664): [#def14]
cmake-3.30.5-build/cmake-3.30.5/Source/cmFindPackageCommand.cxx:568: error[mismatchingContainerIterator]: Iterator 'std::find(labels->begin(),labels->end(),PathLabel::CMakeSystem)' referring to container 'this->PathGroupLabelMap[PathGroup::All]' is used with container 'labels'.
#  566|       std::find(labels->begin(), labels->end(), PathLabel::CMakeSystem),
#  567|       PathLabel::UserRegistry);
#  568|->   labels->insert(
#  569|       std::find(labels->begin(), labels->end(), PathLabel::CMakeSystem),
#  570|       PathLabel::Builds);

Error: CPPCHECK_WARNING (CWE-664): [#def15]
cmake-3.30.5-build/cmake-3.30.5/Source/cmFindPackageCommand.cxx:571: error[mismatchingContainerIterator]: Iterator 'std::find(labels->begin(),labels->end(),PathLabel::Guess)' referring to container 'this->PathGroupLabelMap[PathGroup::All]' is used with container 'labels'.
#  569|       std::find(labels->begin(), labels->end(), PathLabel::CMakeSystem),
#  570|       PathLabel::Builds);
#  571|->   labels->insert(std::find(labels->begin(), labels->end(), PathLabel::Guess),
#  572|                    PathLabel::SystemRegistry);
#  573|   

Error: CPPCHECK_WARNING (CWE-562): [#def16]
cmake-3.30.5-build/cmake-3.30.5/Source/cmGeneratorTarget.cxx:218: error[returnTempReference]: Reference to temporary returned.
#  216|     std::string const& prop) const
#  217|   {
#  218|->   return this->GetProperty(prop);
#  219|   }
#  220|   

Error: COMPILER_WARNING (CWE-563): [#def17]
cmake-3.30.5-build/cmake-3.30.5/Source/cmGeneratorTarget_Sources.cxx: scope_hint: In function ‘void {anonymous}::addFileSetEntry(const cmGeneratorTarget*, const std::string&, cmGeneratorExpressionDAGChecker*, const cmFileSet*, EvaluatedTargetPropertyEntries&)’
cmake-3.30.5-build/cmake-3.30.5/Source/cmGeneratorTarget_Sources.cxx:98:10: warning[-Wunused-variable]: unused variable ‘cm’
#   98 |   cmake* cm = headTarget->GetLocalGenerator()->GetCMakeInstance();
#      |          ^~
#   96|       }
#   97|     }
#   98|->   cmake* cm = headTarget->GetLocalGenerator()->GetCMakeInstance();
#   99|     for (auto& entryCge : fileSet->CompileFileEntries()) {
#  100|       auto tpe = cmGeneratorTarget::TargetPropertyEntry::CreateFileSet(

Error: CPPCHECK_WARNING (CWE-457): [#def18]
cmake-3.30.5-build/cmake-3.30.5/Source/cmGlobalGenerator.cxx:3340: error[uninitvar]: Uninitialized variable: hash
# 3338|   
# 3339|     // Associate the hash with this output.
# 3340|->   this->RuleHashes[fname] = hash;
# 3341|   }
# 3342|   

Error: CPPCHECK_WARNING (CWE-457): [#def19]
cmake-3.30.5-build/cmake-3.30.5/Source/cmGlobalGenerator.cxx:3397: error[uninitvar]: Uninitialized variable: hash
# 3395|           RuleHash hash;
# 3396|           memcpy(hash.Data, line.c_str(), 32);
# 3397|->         this->RuleHashes[fname] = hash;
# 3398|         }
# 3399|       }

Error: CPPCHECK_WARNING (CWE-909): [#def20]
cmake-3.30.5-build/cmake-3.30.5/Source/cmGlobalNinjaGenerator.cxx:2672: error[uninitStructMember]: Uninitialized struct member: module_reference.Method
# 2670|                 }
# 2671|               }
# 2672|->             usages.Reference[i.key().asString()] = module_reference;
# 2673|             }
# 2674|           }

Error: CPPCHECK_WARNING (CWE-457): [#def21]
cmake-3.30.5-build/cmake-3.30.5/Source/cmGlobalNinjaGenerator.cxx:2672: warning[uninitvar]: Uninitialized variable: module_reference.Method
# 2670|                 }
# 2671|               }
# 2672|->             usages.Reference[i.key().asString()] = module_reference;
# 2673|             }
# 2674|           }

Error: CPPCHECK_WARNING (CWE-562): [#def22]
cmake-3.30.5-build/cmake-3.30.5/Source/cmMakefile.h:444: error[returnTempReference]: Reference to temporary returned.
#  442|     const std::string& GetIncludeRegularExpression() const
#  443|     {
#  444|->     return this->GetProperty("INCLUDE_REGULAR_EXPRESSION");
#  445|     }
#  446|   

Error: CPPCHECK_WARNING (CWE-562): [#def23]
cmake-3.30.5-build/cmake-3.30.5/Source/cmMakefileTargetGenerator.cxx:1257: error[invalidLifetime]: Using object that points to local variable 'shellObjI' that is out of scope.
# 1255|           std::string shellObjS = this->LocalGenerator->ConvertToOutputFormat(
# 1256|             objS, cmOutputConverter::SHELL);
# 1257|->         vars.AssemblySource = shellObjS.c_str();
# 1258|   
# 1259|           // Expand placeholders in the commands.

Error: CPPCHECK_WARNING (CWE-587): [#def24]
cmake-3.30.5-build/cmake-3.30.5/Source/cmPolicies.cxx:418: error[assignBoolToPointer]: Boolean value assigned to pointer.
#  416|                                   cmPolicies::PolicyStatus status)
#  417|   {
#  418|->   this->Status[(POLICY_STATUS_COUNT * id) + OLD] = (status == OLD);
#  419|     this->Status[(POLICY_STATUS_COUNT * id) + WARN] = (status == WARN);
#  420|     this->Status[(POLICY_STATUS_COUNT * id) + NEW] = (status == NEW);

Error: CPPCHECK_WARNING (CWE-587): [#def25]
cmake-3.30.5-build/cmake-3.30.5/Source/cmPolicies.cxx:419: error[assignBoolToPointer]: Boolean value assigned to pointer.
#  417|   {
#  418|     this->Status[(POLICY_STATUS_COUNT * id) + OLD] = (status == OLD);
#  419|->   this->Status[(POLICY_STATUS_COUNT * id) + WARN] = (status == WARN);
#  420|     this->Status[(POLICY_STATUS_COUNT * id) + NEW] = (status == NEW);
#  421|   }

Error: CPPCHECK_WARNING (CWE-587): [#def26]
cmake-3.30.5-build/cmake-3.30.5/Source/cmPolicies.cxx:420: error[assignBoolToPointer]: Boolean value assigned to pointer.
#  418|     this->Status[(POLICY_STATUS_COUNT * id) + OLD] = (status == OLD);
#  419|     this->Status[(POLICY_STATUS_COUNT * id) + WARN] = (status == WARN);
#  420|->   this->Status[(POLICY_STATUS_COUNT * id) + NEW] = (status == NEW);
#  421|   }
#  422|   

Error: CPPCHECK_WARNING (CWE-562): [#def27]
cmake-3.30.5-build/cmake-3.30.5/Source/cmStringCommand.cxx:969: error[returnTempReference]: Reference to temporary returned.
#  967|     const std::string& res = *this->begin();
#  968|     this->advance(1);
#  969|->   return res;
#  970|   }
#  971|   

Error: COMPILER_WARNING (CWE-1164): [#def28]
cmake-3.30.5-build/cmake-3.30.5/Source/cmakemain.cxx:662:6: warning[-Wunused-function]: ‘bool {anonymous}::parse_default_directory_permissions(const std::string&, std::string&)’ defined but not used
#  662 | bool parse_default_directory_permissions(const std::string& permissions,
#      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  660|   }
#  661|   
#  662|-> bool parse_default_directory_permissions(const std::string& permissions,
#  663|                                            std::string& parsedPermissionsVar)
#  664|   {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def29]
cmake-3.30.5-build/cmake-3.30.5/Source/kwsys/ProcessUNIX.c: scope_hint: In function ‘cmsysProcess_AddCommand’
cmake-3.30.5-build/cmake-3.30.5/Source/kwsys/ProcessUNIX.c:428:36: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘*cp.Commands’
cmake-3.30.5-build/cmake-3.30.5/redhat-linux-build/Bootstrap.cmk/cmsys/Process.h:6: included_from: Included from here.
cmake-3.30.5-build/cmake-3.30.5/Source/kwsys/ProcessUNIX.c:8: included_from: Included from here.
cmake-3.30.5-build/cmake-3.30.5/redhat-linux-build/Bootstrap.cmk/cmsys/Process.h:21:35: note: in expansion of macro ‘kwsys_ns’
cmake-3.30.5-build/cmake-3.30.5/Source/kwsys/ProcessUNIX.c:382:5: note: in expansion of macro ‘kwsysProcess_SetCommand’
cmake-3.30.5-build/cmake-3.30.5/redhat-linux-build/Bootstrap.cmk/cmsys/Process.h:22:35: note: in expansion of macro ‘kwsys_ns’
cmake-3.30.5-build/cmake-3.30.5/Source/kwsys/ProcessUNIX.c:401:12: note: in expansion of macro ‘kwsysProcess_AddCommand’
cmake-3.30.5-build/cmake-3.30.5/redhat-linux-build/Bootstrap.cmk/cmsys/Process.h:22:35: note: in expansion of macro ‘kwsys_ns’
cmake-3.30.5-build/cmake-3.30.5/Source/kwsys/ProcessUNIX.c:401:12: note: in expansion of macro ‘kwsysProcess_AddCommand’
cmake-3.30.5-build/cmake-3.30.5/redhat-linux-build/Bootstrap.cmk/cmsys/Process.h:22:35: note: in expansion of macro ‘kwsys_ns’
cmake-3.30.5-build/cmake-3.30.5/Source/kwsys/ProcessUNIX.c:406:5: note: in expansion of macro ‘kwsysProcess_AddCommand’
#  426|       int i;
#  427|       for (i = 0; i < cp->NumberOfCommands; ++i) {
#  428|->       newCommands[i] = cp->Commands[i];
#  429|       }
#  430|     }

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def30]
cmake-3.30.5-build/cmake-3.30.5/Source/kwsys/ProcessUNIX.c:1658:13: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘*cp.SignalPipe’
cmake-3.30.5-build/cmake-3.30.5/redhat-linux-build/Bootstrap.cmk/cmsys/Process.h:83:29: note: in expansion of macro ‘kwsys_ns’
cmake-3.30.5-build/cmake-3.30.5/Source/kwsys/ProcessUNIX.c:1441:6: note: in expansion of macro ‘kwsysProcess_Kill’
# 1656|       /* Keep trying to close until it is not interrupted by a
# 1657|        * signal.  */
# 1658|->     while ((close(*pfd) < 0) && (errno == EINTR)) {
# 1659|       }
# 1660|       *pfd = -1;

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def31]
cmake-3.30.5-build/cmake-3.30.5/Source/kwsys/ProcessUNIX.c: scope_hint: In function ‘kwsysProcessCleanupDescriptor.part.0’
cmake-3.30.5-build/cmake-3.30.5/Source/kwsys/ProcessUNIX.c:1658:13: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘*pfd’
# 1656|       /* Keep trying to close until it is not interrupted by a
# 1657|        * signal.  */
# 1658|->     while ((close(*pfd) < 0) && (errno == EINTR)) {
# 1659|       }
# 1660|       *pfd = -1;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def32]
cmake-3.30.5-build/cmake-3.30.5/Source/kwsys/System.c: scope_hint: In function ‘kwsysSystem__AppendByte’
cmake-3.30.5-build/cmake-3.30.5/Source/kwsys/System.c:35:5: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*begin’
cmake-3.30.5-build/cmake-3.30.5/redhat-linux-build/Bootstrap.cmk/cmsys/System.h:6: included_from: Included from here.
cmake-3.30.5-build/cmake-3.30.5/Source/kwsys/System.c:4: included_from: Included from here.
cmake-3.30.5-build/cmake-3.30.5/redhat-linux-build/Bootstrap.cmk/cmsys/System.h:18:5: note: in expansion of macro ‘kwsys_ns’
cmake-3.30.5-build/cmake-3.30.5/Source/kwsys/System.c:227:8: note: in expansion of macro ‘kwsysSystem_Parse_CommandForUnix’
#   33|         return 0;
#   34|       }
#   35|->     memcpy(newBuffer, *begin, (size_t)(length) * sizeof(char));
#   36|       if (*begin != local) {
#   37|         free(*begin);

Error: CPPCHECK_WARNING (CWE-562): [#def33]
cmake-3.30.5-build/cmake-3.30.5/Source/kwsys/SystemTools.cxx:2023: error[returnDanglingLifetime]: Returning pointer to local variable 'newstr' that will be invalid when returning.
# 2021|     if (str) {
# 2022|       char* newstr = new char[strlen(str) + 1];
# 2023|->     return strcpy(newstr, str);
# 2024|     }
# 2025|     return nullptr;

Error: GCC_ANALYZER_WARNING (CWE-835): [#def34]
cmake-3.30.5-build/cmake-3.30.5/Source/kwsys/testProcess.c: scope_hint: In function ‘test6’
cmake-3.30.5-build/cmake-3.30.5/Source/kwsys/testProcess.c:186:5: warning[-Wanalyzer-infinite-loop]: infinite loop
#  184|     /* Generate huge amounts of output to test killing.  */
#  185|     for (;;) {
#  186|->     fwrite(runaway, 1, TEST6_SIZE + 1, stdout);
#  187|       fflush(stdout);
#  188|     }

Error: CPPCHECK_WARNING (CWE-664): [#def35]
cmake-3.30.5-build/cmake-3.30.5/Tests/CMakeLib/testStringAlgorithms.cxx:163: error[invalidContainer]: Using pointer to local variable 'val' that may be invalid.
#  161|           expect = "cmStrCat " + std::move(expect);
#  162|         }
#  163|->       if (val.data() != data || val.capacity() != capacity) {
#  164|           moved = false;
#  165|         }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def36]
cmake-3.30.5-build/cmake-3.30.5/Tests/RunCMake/detect_jobserver.c: scope_hint: In function ‘jobserver_auth’
cmake-3.30.5-build/cmake-3.30.5/Tests/RunCMake/detect_jobserver.c:65:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘result’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strncpy’ must be non-null
#   63|     len = (size_t)(end - start);
#   64|     result = (char*)malloc(len + 1);
#   65|->   strncpy(result, start, len);
#   66|     result[len] = '\0';
#   67|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def37]
cmake-3.30.5-build/cmake-3.30.5/Tests/RunCMake/detect_jobserver.c: scope_hint: In function ‘main’
cmake-3.30.5-build/cmake-3.30.5/Tests/RunCMake/detect_jobserver.c:158:6: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(output_file, "w")’
#  156|     output_file = argv[1];
#  157|     fp = fopen(output_file, "w");
#  158|->   if (fp == NULL) {
#  159|       fprintf(stderr, "Error opening output file: %s\n", output_file);
#  160|       return 2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
cmake-3.30.5-build/cmake-3.30.5/Tests/RunCMake/detect_jobserver.c:158:6: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(output_file, "w")’
#  156|     output_file = argv[1];
#  157|     fp = fopen(output_file, "w");
#  158|->   if (fp == NULL) {
#  159|       fprintf(stderr, "Error opening output file: %s\n", output_file);
#  160|       return 2;

Error: CPPCHECK_WARNING (CWE-404): [#def39]
cmake-3.30.5-build/cmake-3.30.5/Tests/RunCMake/detect_jobserver.c:166: error[resourceLeak]: Resource leak: fp
#  164|     if (jobserver == NULL) {
#  165|       fprintf(stderr, "%s\n", message);
#  166|->     return 1;
#  167|     }
#  168|   

Error: CPPCHECK_WARNING (CWE-404): [#def40]
cmake-3.30.5-build/cmake-3.30.5/Tests/RunCMake/detect_jobserver.c:177: error[resourceLeak]: Resource leak: fp
#  175|     message[MAX_MESSAGE_LENGTH] = '\0';
#  176|   
#  177|->   return result;
#  178|   }

Error: COMPILER_WARNING (CWE-1164): [#def41]
cmake-3.30.5-build/cmake-3.30.5/Utilities/cmlibrhash/librhash/rhash.c:429:13: warning[-Wunused-function]: ‘rhash_put_digest’ defined but not used
#  429 | static void rhash_put_digest(rhash ctx, unsigned hash_id, unsigned char* result)
#      |             ^~~~~~~~~~~~~~~~
#  427|    * @param result buffer to put the hash into
#  428|    */
#  429|-> static void rhash_put_digest(rhash ctx, unsigned hash_id, unsigned char* result)
#  430|   {
#  431|   	rhash_context_ext* const ectx = (rhash_context_ext*)ctx;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def42]
cmake-3.30.5-build/cmake-3.30.5/Utilities/cmlibuv/src/unix/core.c: scope_hint: In function ‘uv__open_file’
cmake-3.30.5-build/cmake-3.30.5/Utilities/cmlibuv/src/unix/core.c:1009:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘uv__open_cloexec(path, 0)’
# 1007|     int fd;
# 1008|   
# 1009|->   fd = open(path, flags | O_CLOEXEC);
# 1010|     if (fd == -1)
# 1011|       return UV__ERR(errno);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def43]
cmake-3.30.5-build/cmake-3.30.5/Utilities/cmlibuv/src/unix/pipe.c: scope_hint: In function ‘uv__pipe_listen’
cmake-3.30.5-build/cmake-3.30.5/Utilities/cmlibuv/src/unix/pipe.c:110:6: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*handle.io_watcher.fd’
#  108|   #endif
#  109|   
#  110|->   if (listen(uv__stream_fd(handle), backlog))
#  111|       return UV__ERR(errno);
#  112|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def44]
cmake-3.30.5-build/cmake-3.30.5/Utilities/cmlibuv/src/unix/pipe.c:115:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*handle.io_watcher.fd’
#  113|     handle->connection_cb = cb;
#  114|     handle->io_watcher.cb = uv__server_io;
#  115|->   uv__io_start(handle->loop, &handle->io_watcher, POLLIN);
#  116|     return 0;
#  117|   }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def45]
cmake-3.30.5-build/cmake-3.30.5/Utilities/cmlibuv/src/unix/pipe.c: scope_hint: In function ‘uv__pipe_getsockpeername’
cmake-3.30.5-build/cmake-3.30.5/Utilities/cmlibuv/src/unix/pipe.c:273:3: warning[-Wanalyzer-null-argument]: use of NULL ‘buffer’ where non-null expected
cmake-3.30.5-build/cmake-3.30.5/Utilities/cmlibuv/src/unix/pipe.c: scope_hint: In function ‘uv__pipe_getsockpeername’
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
#  271|     }
#  272|   
#  273|->   memcpy(buffer, sa.sun_path, addrlen);
#  274|     *size = addrlen;
#  275|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def46]
cmake-3.30.5-build/cmake-3.30.5/Utilities/cmlibuv/src/unix/process.c: scope_hint: In function ‘uv__process_child_init’
cmake-3.30.5-build/cmake-3.30.5/Utilities/cmlibuv/src/unix/process.c:357:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘close_fd’
#  355|       use_fd = pipes[fd][1];
#  356|   
#  357|->     if (use_fd < 0) {
#  358|         if (fd >= 3)
#  359|           continue;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def47]
cmake-3.30.5-build/cmake-3.30.5/redhat-linux-build/Source/kwsys/cmsysTestsC.c: scope_hint: In function ‘main’
cmake-3.30.5-build/cmake-3.30.5/redhat-linux-build/Source/kwsys/cmsysTestsC.c:175:31: warning[-Wanalyzer-null-argument]: use of NULL ‘arg’ where non-null expected
cmake-3.30.5-build/cmake-3.30.5/redhat-linux-build/Source/kwsys/cmsysTestsC.c:29:38: note: in definition of macro ‘CM_CAST’
<built-in>: note: argument 2 of ‘__builtin_strstr’ must be non-null
#  173|     for (i = 0; i < NumTests && testToRun == -1; ++i) {
#  174|       char *test_name = lowercase(cmakeGeneratedFunctionMapEntries[i].name);
#  175|->     if (partial_match != 0 && strstr(test_name, arg) != CM_NULL) { /* NOLINT */
#  176|         testToRun = i;
#  177|         ac -= 2;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def48]
cmake-3.30.5-build/cmake-3.30.5/redhat-linux-build/Source/kwsys/cmsysTestsC.c:175:31: warning[-Wanalyzer-null-argument]: use of NULL ‘lowercase(cmakeGeneratedFunctionMapEntries[i].name)’ where non-null expected
cmake-3.30.5-build/cmake-3.30.5/redhat-linux-build/Source/kwsys/cmsysTestsC.c:29:38: note: in definition of macro ‘CM_CAST’
<built-in>: note: argument 1 of ‘__builtin_strstr’ must be non-null
#  173|     for (i = 0; i < NumTests && testToRun == -1; ++i) {
#  174|       char *test_name = lowercase(cmakeGeneratedFunctionMapEntries[i].name);
#  175|->     if (partial_match != 0 && strstr(test_name, arg) != CM_NULL) { /* NOLINT */
#  176|         testToRun = i;
#  177|         ac -= 2;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def49]
cmake-3.30.5-build/cmake-3.30.5/redhat-linux-build/Source/kwsys/cmsysTestsC.c:175:31: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
cmake-3.30.5-build/cmake-3.30.5/redhat-linux-build/Source/kwsys/cmsysTestsC.c:29:38: note: in definition of macro ‘CM_CAST’
/usr/include/string.h:350:14: note: argument 1 of ‘strstr’ must be a pointer to a null-terminated string
#  173|     for (i = 0; i < NumTests && testToRun == -1; ++i) {
#  174|       char *test_name = lowercase(cmakeGeneratedFunctionMapEntries[i].name);
#  175|->     if (partial_match != 0 && strstr(test_name, arg) != CM_NULL) { /* NOLINT */
#  176|         testToRun = i;
#  177|         ac -= 2;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def50]
cmake-3.30.5-build/cmake-3.30.5/redhat-linux-build/Source/kwsys/cmsysTestsC.c:175:31: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*arg’
cmake-3.30.5-build/cmake-3.30.5/redhat-linux-build/Source/kwsys/cmsysTestsC.c:29:38: note: in definition of macro ‘CM_CAST’
cmake-3.30.5-build/cmake-3.30.5/redhat-linux-build/Source/kwsys/cmsysTestsC.c:4: included_from: Included from here.
/usr/include/string.h:350:14: note: argument 2 of ‘strstr’ must be a pointer to a null-terminated string
#  173|     for (i = 0; i < NumTests && testToRun == -1; ++i) {
#  174|       char *test_name = lowercase(cmakeGeneratedFunctionMapEntries[i].name);
#  175|->     if (partial_match != 0 && strstr(test_name, arg) != CM_NULL) { /* NOLINT */
#  176|         testToRun = i;
#  177|         ac -= 2;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def51]
cmake-3.30.5-build/cmake-3.30.5/redhat-linux-build/Source/kwsys/cmsysTestsC.c:179:38: warning[-Wanalyzer-null-argument]: use of NULL ‘arg’ where non-null expected
cmake-3.30.5-build/cmake-3.30.5/redhat-linux-build/Source/kwsys/cmsysTestsC.c:29:38: note: in definition of macro ‘CM_CAST’
/usr/include/string.h:156:12: note: argument 2 of ‘strcmp’ must be non-null
#  177|         ac -= 2;
#  178|         av += 2;
#  179|->     } else if (partial_match == 0 && strcmp(test_name, arg) == 0) {
#  180|         testToRun = i;
#  181|         ac--;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def52]
cmake-3.30.5-build/cmake-3.30.5/redhat-linux-build/Source/kwsys/cmsysTestsC.c:179:38: warning[-Wanalyzer-null-argument]: use of NULL ‘lowercase(cmakeGeneratedFunctionMapEntries[i].name)’ where non-null expected
cmake-3.30.5-build/cmake-3.30.5/redhat-linux-build/Source/kwsys/cmsysTestsC.c:29:38: note: in definition of macro ‘CM_CAST’
/usr/include/string.h:156:12: note: argument 1 of ‘strcmp’ must be non-null
#  177|         ac -= 2;
#  178|         av += 2;
#  179|->     } else if (partial_match == 0 && strcmp(test_name, arg) == 0) {
#  180|         testToRun = i;
#  181|         ac--;

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-27.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namecmake-3.30.5-1.fc42
store-results-to/tmp/tmp351tpknn/cmake-3.30.5-1.fc42.tar.xz
time-created2024-11-12 23:56:13
time-finished2024-11-13 00:25:33
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp351tpknn/cmake-3.30.5-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp351tpknn/cmake-3.30.5-1.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9