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(nullptr, Severity::style, "constParameter", "Parameter 'x' can be declared with const");
1630
1630
reportError(nullptr, Severity::style, "constVariable", "Variable 'x' can be declared with const");
1631
+
reportError(nullptr, Severity::style, "constParameterReference", "Parameter 'x' can be declared with const");
1632
+
reportError(nullptr, Severity::style, "constVariableReference", "Variable 'x' can be declared with const");
1633
+
reportError(nullptr, Severity::style, "constParameterPointer", "Parameter 'x' can be declared with const");
1634
+
reportError(nullptr, Severity::style, "constVariablePointer", "Variable 'x' can be declared with const");
1631
1635
reportError(nullptr, Severity::style, "constParameterCallback", "Parameter 'x' can be declared with const, however it seems that 'f' is a callback function.");
errorPath.emplace_front(function->functionPointerUsage, "You might need to cast the function pointer here");
1645
1649
id += "Callback";
1646
1650
message += ". However it seems that '" + function->name() + "' is a callback function, if '$symbol' is declared with const you might also need to cast function pointer(s).";
Copy file name to clipboardExpand all lines: releasenotes.txt
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,4 +4,12 @@ release notes for cppcheck-2.11
4
4
- It is no longer necessary to run "--check-config" to get detailed "missingInclude" and "missingIncludeSystem" messages. They will always be issued in the regular analysis if "missingInclude" is enabled.
5
5
- "missingInclude" and "missingIncludeSystem" are reported with "-j" is > 1 and processes are used in the backend (default in non-Windows binaries)
6
6
- "missingInclude" and "missingIncludeSystem" will now cause the "--error-exitcode" to be applied
7
-
- "--enable=information" will no longer implicitly enable "missingInclude" starting with 2.16. Please enable it explicitly if you require it.
7
+
- "--enable=information" will no longer implicitly enable "missingInclude" starting with 2.16. Please enable it explicitly if you require it.
8
+
- The `constParameter` and `constVariable` checks have been split into 3 different IDs based on if the variable is a pointer, a reference, or local. The different IDs will allow users to suppress different const warning based on variable type.
0 commit comments