mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
remove cases involving sizeof
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
| 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 |
|
||||
| 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 |
|
||||
| test.cpp:28:5:28: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 |
|
||||
| test.cpp:39:5:39: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 |
|
||||
|
||||
@@ -12,6 +12,7 @@ int vfprintf (FILE *, const char *, va_list);
|
||||
|
||||
int a = 1;
|
||||
int b;
|
||||
int *c;
|
||||
|
||||
int my_printf(const char * fmt, ...)
|
||||
{
|
||||
@@ -37,8 +38,9 @@ void f2() {
|
||||
|
||||
int main()
|
||||
{
|
||||
unsigned size = sizeof(*c); // GOOD
|
||||
my_printf("%d\n", b); // BAD
|
||||
b = f1();
|
||||
f2();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user