Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bdd0589 commit faa9d83Copy full SHA for faa9d83
2 files changed
cpp/ql/test/query-tests/Likely Bugs/Likely Typos/AssignWhereCompareMeant/AssignWhereCompareMeant.expected
@@ -14,3 +14,4 @@
14
| test.cpp:84:7:84:11 | ... = ... | Use of '=' where '==' may have been intended. |
15
| test.cpp:92:17:92:22 | ... = ... | Use of '=' where '==' may have been intended. |
16
| test.cpp:113:6:113:10 | ... = ... | Use of '=' where '==' may have been intended. |
17
+| test.cpp:124:6:124:15 | ... = ... | Use of '=' where '==' may have been intended. |
cpp/ql/test/query-tests/Likely Bugs/Likely Typos/AssignWhereCompareMeant/test.cpp
@@ -116,4 +116,11 @@ void h() {
116
117
void f() {
118
h<int>();
119
+}
120
+
121
+void f2() {
122
+ const char* sz = "abc";
123
124
+ if(sz = "def") { // GOOD [FALSE POSITIVE]: a == comparison with a string literal is probably not the intent here
125
+ }
126
}
0 commit comments