You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reportError(tok, "all", "strncatUsage", "Dangerous usage of strncat. Tip: the 3rd parameter means maximum number of characters to append");
65
+
reportError(tok, Severity::possibleError, "strncatUsage", "Dangerous usage of strncat. Tip: the 3rd parameter means maximum number of characters to append");
reportError(tok, "all style", "operatorEqVarError", "Member variable '" + classname + "::" + varname + "' is not assigned a value in '" + classname + "::operator=" + "'");
787
+
reportError(tok, Severity::possibleStyle, "operatorEqVarError", "Member variable '" + classname + "::" + varname + "' is not assigned a value in '" + classname + "::operator=" + "'");
reportError(tok, "error", "virtualDestructor", "Class " + Base + " which is inherited by class " + Derived + " does not have a virtual destructor");
812
+
reportError(tok, Severity::error, "virtualDestructor", "Class " + Base + " which is inherited by class " + Derived + " does not have a virtual destructor");
reportError(tok, "style", "redundantIfRemove", "Redundant condition. The remove function in the STL will not do anything if element doesn't exist");
978
+
reportError(tok, Severity::style, "redundantIfRemove", "Redundant condition. The remove function in the STL will not do anything if element doesn't exist");
reportError(tok, "error", "sprintfOverlappingData", "Overlapping data buffer " + varname + "\nWhen using sprintf the same buffer must not be used both for output and input. The behaviour is undefined when that happens.\nFor example: 'sprintf(str,\"<%s>\",str);'");
993
+
reportError(tok, Severity::error, "sprintfOverlappingData", "Overlapping data buffer " + varname + "\nWhen using sprintf the same buffer must not be used both for output and input. The behaviour is undefined when that happens.\nFor example: 'sprintf(str,\"<%s>\",str);'");
994
994
}
995
995
996
996
voidCheckOther::udivError(const Token *tok)
997
997
{
998
-
reportError(tok, "error", "udivError", "Unsigned division. The result will be wrong.");
998
+
reportError(tok, Severity::error, "udivError", "Unsigned division. The result will be wrong.");
999
999
}
1000
1000
1001
1001
voidCheckOther::udivWarning(const Token *tok)
1002
1002
{
1003
-
reportError(tok, "all style", "udivWarning", "Warning: Division with signed and unsigned operators");
1003
+
reportError(tok, Severity::possibleStyle, "udivWarning", "Warning: Division with signed and unsigned operators");
reportError(tok, "style", "passedByValue", "Function parameter '" + parname + "' is passed by value. It could be passed by reference instead.");
1013
+
reportError(tok, Severity::style, "passedByValue", "Function parameter '" + parname + "' is passed by value. It could be passed by reference instead.");
0 commit comments