We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93c485f commit 114b468Copy full SHA for 114b468
cpp/ql/test/query-tests/Critical/GlobalUseBeforeInit/GlobalUseBeforeInit.expected
@@ -1 +1,2 @@
1
| test.cpp:27:5:27:6 | f1 | The variable $@ is used in this function but may not be initialized when it is called. | test.cpp:14:5:14:5 | b | b |
2
+| test.cpp:38:5:38:8 | main | The variable $@ is used in this function but may not be initialized when it is called. | test.cpp:14:5:14:5 | b | b |
cpp/ql/test/query-tests/Critical/GlobalUseBeforeInit/test.cpp
@@ -31,8 +31,14 @@ int f1()
31
return 0;
32
}
33
34
+void f2() {
35
+ my_printf("%d\n", b); // GOOD
36
+}
37
+
38
int main()
39
{
- int b = f1();
40
+ my_printf("%d\n", b); // BAD
41
+ b = f1();
42
+ f2();
43
44
0 commit comments