Skip to content

Commit 5a9d0b3

Browse files
authored
templatesimplifier.cpp: fixed clang-analyzer-alpha.core.Conversion warning in getTemplateInstantiations() (#7384)
``` /home/runner/work/cppcheck/cppcheck/lib/templatesimplifier.cpp:824:42: error: Loss of sign in implicit conversion [clang-analyzer-alpha.core.Conversion,-warnings-as-errors] 824 | const unsigned int pos = getTemplateNamePosition(tok); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ```
1 parent 21dd3bd commit 5a9d0b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/templatesimplifier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ void TemplateSimplifier::getTemplateInstantiations()
821821
// Don't ignore user specialization but don't consider it an instantiation.
822822
// Instantiations in return type, function parameters, and executable code
823823
// are not ignored.
824-
const unsigned int pos = getTemplateNamePosition(tok);
824+
const int pos = getTemplateNamePosition(tok);
825825
if (pos > 0)
826826
skip = tok->tokAt(pos);
827827
} else {

0 commit comments

Comments
 (0)