sval: update check_snprintf.c
[smatch.git] / validation / sm_casts2.c
blob3672ed3abb426a3d6431e70780a6212d8b4c2b0c
1 #include <stdio.h>
3 unsigned int frob();
5 unsigned char *a;
6 unsigned int *b;
7 int *c;
8 char *****d;
9 int main(void)
12 if (*a == (unsigned int)-1)
13 frob();
14 if (*b == (unsigned int)-1)
15 frob();
16 if (*c == (unsigned int)-1)
17 frob();
18 if (*d == (unsigned int)-1)
19 frob();
20 if (*d == -1)
21 frob();
22 if (*****d == (unsigned int)-1)
23 frob();
24 return 0;
27 * check-name: smatch casts pointers
28 * check-command: smatch sm_casts2.c
30 * check-output-start
31 sm_casts2.c:12 main() error: *a is never equal to 4294967295 (wrong type 0 - 255).
32 sm_casts2.c:22 main() error: *****d is never equal to 4294967295 (wrong type -128 - 127).
33 * check-output-end