$ cat main.c
int main(int argc, char *argv[])
{
int i = 0;
int j;
printf("i %d\n", i);
printf("j %d\n", j);
}
$ clang main.c -checker-simple
ANALYZE: main.c main
main.c:6:2: warning: [CHECKER] Pass-by-value argument in function
is undefined.
printf("j %d\n", j);
^ ~
1 diagnostic generated.
Hi Holger,
Do you have a particular question? The warning has to do with the value of 'j' is uninitialized and passed as an argument to printf. Do you feel that the diagnostic is unclear? I need a little bit more than a screen dump to understand your concerns.
Ted
Hi Holger,
Do you have a particular question? The warning has to do with
the value of 'j' is uninitialized and passed as an argument to
printf.
Sorry, I did not read the warning correctly.
After "Pass-by-value" my mind stopped reading. The real part of
the warning was at the end of the warning, not at the
beginning: "is undefined".