@@ -46,6 +46,8 @@ static const struct CWE CWE563(563U); // Assignment to Variable without Use ('
4646static const struct CWE CWE570 (570U ); // Expression is Always False
4747static const struct CWE CWE571 (571U ); // Expression is Always True
4848static const struct CWE CWE672 (672U ); // Operation on a Resource after Expiration or Release
49+ static const struct CWE CWE628 (628U ); // Function Call with Incorrectly Specified Arguments
50+ static const struct CWE CWE683 (683U ); // Function Call With Incorrect Order of Arguments
4951static const struct CWE CWE686 (686U ); // Function Call With Incorrect Argument Type
5052static const struct CWE CWE687 (687U ); // Function Call With Incorrectly Specified Argument Value
5153static const struct CWE CWE688 (688U ); // Function Call With Incorrect Variable or Reference as Argument
@@ -2875,7 +2877,7 @@ void CheckOther::funcArgNamesDifferent(const std::string & functionName, size_t
28752877 reportError (tokens, Severity::style, " funcArgNamesDifferent" ,
28762878 " Function '" + functionName + " ' argument " + MathLib::toString (index + 1 ) + " names different: declaration '" +
28772879 (declaration ? declaration->str () : std::string (" A" )) + " ' definition '" +
2878- (definition ? definition->str () : std::string (" B" )) + " '." , CWE ( 0U ) , true );
2880+ (definition ? definition->str () : std::string (" B" )) + " '." , CWE628 , true );
28792881}
28802882
28812883void CheckOther::funcArgOrderDifferent (const std::string & functionName,
@@ -2901,6 +2903,6 @@ void CheckOther::funcArgOrderDifferent(const std::string & functionName,
29012903 msg += definitions[i]->str ();
29022904 }
29032905 msg += " '" ;
2904- reportError (tokens, Severity::warning, " funcArgOrderDifferent" , msg, CWE ( 0U ) , false );
2906+ reportError (tokens, Severity::warning, " funcArgOrderDifferent" , msg, CWE683 , false );
29052907}
29062908
0 commit comments