Skip to content

Commit 83e618d

Browse files
committed
C++: Make cpp/comparison-with-wider-type visible
The results from this query look good on real-world projects, so let's make it visible by default.
1 parent 46d7792 commit 83e618d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

change-notes/1.22/analysis-cpp.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
| No space for zero terminator (`cpp/no-space-for-terminator`) | Fewer false positive results | False positives involving strings that are not null-terminated have been excluded. |
1616
| Suspicious pointer scaling (`cpp/suspicious-pointer-scaling`) | Lower precision | The precision of this query has been reduced to "medium". This coding pattern is used intentionally and safely in a number of real-world projects. Results are no longer displayed on LGTM unless you choose to display them. |
1717
| Non-constant format string (`cpp/non-constant-format`) | Fewer false positive results | Rewritten using the taint-tracking library. |
18+
| Comparison of narrow type with wide type in loop condition (`cpp/comparison-with-wider-type`) | Higher precision | The precision of this query has been increased to "high" as the alerts from this query have proved to be valuable on real-world projects. With this precision, results are now displayed by default on LGTM. |
1819

1920
## Changes to QL libraries
2021

cpp/ql/src/Security/CWE/CWE-190/ComparisonWithWiderType.ql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@
55
* @id cpp/comparison-with-wider-type
66
* @kind problem
77
* @problem.severity warning
8-
* @precision medium
8+
* @precision high
99
* @tags reliability
1010
* security
1111
* external/cwe/cwe-190
1212
* external/cwe/cwe-197
1313
* external/cwe/cwe-835
14-
*
15-
*/
14+
*/
1615

1716
import cpp
1817
import semmle.code.cpp.controlflow.Dominance

0 commit comments

Comments
 (0)