@@ -1715,7 +1715,7 @@ void CheckIO::wrongPrintfScanfArgumentsError(const Token* tok,
17151715 nonneg int numFormat,
17161716 nonneg int numFunction)
17171717{
1718- const Severity::SeverityType severity = numFormat > numFunction ? Severity::error : Severity::warning;
1718+ const Severity severity = numFormat > numFunction ? Severity::error : Severity::warning;
17191719 if (severity != Severity::error && !mSettings ->severity .isEnabled (Severity::warning))
17201720 return ;
17211721
@@ -1749,7 +1749,7 @@ void CheckIO::wrongPrintfScanfPosixParameterPositionError(const Token* tok, cons
17491749
17501750void CheckIO::invalidScanfArgTypeError_s (const Token* tok, nonneg int numFormat, const std::string& specifier, const ArgumentInfo* argInfo)
17511751{
1752- const Severity::SeverityType severity = getSeverity (argInfo);
1752+ const Severity severity = getSeverity (argInfo);
17531753 if (!mSettings ->severity .isEnabled (severity))
17541754 return ;
17551755 std::ostringstream errmsg;
@@ -1765,7 +1765,7 @@ void CheckIO::invalidScanfArgTypeError_s(const Token* tok, nonneg int numFormat,
17651765}
17661766void CheckIO::invalidScanfArgTypeError_int (const Token* tok, nonneg int numFormat, const std::string& specifier, const ArgumentInfo* argInfo, bool isUnsigned)
17671767{
1768- const Severity::SeverityType severity = getSeverity (argInfo);
1768+ const Severity severity = getSeverity (argInfo);
17691769 if (!mSettings ->severity .isEnabled (severity))
17701770 return ;
17711771 std::ostringstream errmsg;
@@ -1810,7 +1810,7 @@ void CheckIO::invalidScanfArgTypeError_int(const Token* tok, nonneg int numForma
18101810}
18111811void CheckIO::invalidScanfArgTypeError_float (const Token* tok, nonneg int numFormat, const std::string& specifier, const ArgumentInfo* argInfo)
18121812{
1813- const Severity::SeverityType severity = getSeverity (argInfo);
1813+ const Severity severity = getSeverity (argInfo);
18141814 if (!mSettings ->severity .isEnabled (severity))
18151815 return ;
18161816 std::ostringstream errmsg;
@@ -1829,7 +1829,7 @@ void CheckIO::invalidScanfArgTypeError_float(const Token* tok, nonneg int numFor
18291829
18301830void CheckIO::invalidPrintfArgTypeError_s (const Token* tok, nonneg int numFormat, const ArgumentInfo* argInfo)
18311831{
1832- const Severity::SeverityType severity = getSeverity (argInfo);
1832+ const Severity severity = getSeverity (argInfo);
18331833 if (!mSettings ->severity .isEnabled (severity))
18341834 return ;
18351835 std::ostringstream errmsg;
@@ -1840,7 +1840,7 @@ void CheckIO::invalidPrintfArgTypeError_s(const Token* tok, nonneg int numFormat
18401840}
18411841void CheckIO::invalidPrintfArgTypeError_n (const Token* tok, nonneg int numFormat, const ArgumentInfo* argInfo)
18421842{
1843- const Severity::SeverityType severity = getSeverity (argInfo);
1843+ const Severity severity = getSeverity (argInfo);
18441844 if (!mSettings ->severity .isEnabled (severity))
18451845 return ;
18461846 std::ostringstream errmsg;
@@ -1851,7 +1851,7 @@ void CheckIO::invalidPrintfArgTypeError_n(const Token* tok, nonneg int numFormat
18511851}
18521852void CheckIO::invalidPrintfArgTypeError_p (const Token* tok, nonneg int numFormat, const ArgumentInfo* argInfo)
18531853{
1854- const Severity::SeverityType severity = getSeverity (argInfo);
1854+ const Severity severity = getSeverity (argInfo);
18551855 if (!mSettings ->severity .isEnabled (severity))
18561856 return ;
18571857 std::ostringstream errmsg;
@@ -1901,7 +1901,7 @@ static void printfFormatType(std::ostream& os, const std::string& specifier, boo
19011901
19021902void CheckIO::invalidPrintfArgTypeError_uint (const Token* tok, nonneg int numFormat, const std::string& specifier, const ArgumentInfo* argInfo)
19031903{
1904- const Severity::SeverityType severity = getSeverity (argInfo);
1904+ const Severity severity = getSeverity (argInfo);
19051905 if (!mSettings ->severity .isEnabled (severity))
19061906 return ;
19071907 std::ostringstream errmsg;
@@ -1915,7 +1915,7 @@ void CheckIO::invalidPrintfArgTypeError_uint(const Token* tok, nonneg int numFor
19151915
19161916void CheckIO::invalidPrintfArgTypeError_sint (const Token* tok, nonneg int numFormat, const std::string& specifier, const ArgumentInfo* argInfo)
19171917{
1918- const Severity::SeverityType severity = getSeverity (argInfo);
1918+ const Severity severity = getSeverity (argInfo);
19191919 if (!mSettings ->severity .isEnabled (severity))
19201920 return ;
19211921 std::ostringstream errmsg;
@@ -1928,7 +1928,7 @@ void CheckIO::invalidPrintfArgTypeError_sint(const Token* tok, nonneg int numFor
19281928}
19291929void CheckIO::invalidPrintfArgTypeError_float (const Token* tok, nonneg int numFormat, const std::string& specifier, const ArgumentInfo* argInfo)
19301930{
1931- const Severity::SeverityType severity = getSeverity (argInfo);
1931+ const Severity severity = getSeverity (argInfo);
19321932 if (!mSettings ->severity .isEnabled (severity))
19331933 return ;
19341934 std::ostringstream errmsg;
@@ -1941,7 +1941,7 @@ void CheckIO::invalidPrintfArgTypeError_float(const Token* tok, nonneg int numFo
19411941 reportError (tok, severity, " invalidPrintfArgType_float" , errmsg.str (), CWE686, Certainty::normal);
19421942}
19431943
1944- Severity::SeverityType CheckIO::getSeverity (const CheckIO::ArgumentInfo *argInfo)
1944+ Severity CheckIO::getSeverity (const CheckIO::ArgumentInfo *argInfo)
19451945{
19461946 return (argInfo && argInfo->typeToken && !argInfo->typeToken ->originalName ().empty ()) ? Severity::portability : Severity::warning;
19471947}
0 commit comments