db/vim_db: don't complain when the file is not found
[smatch.git] / validation / sm_casts2.c
blobd3057c1530c120b3b1ba099c28c42aca9fab9eed
1 #include <stdio.h>
3 unsigned int frob();
5 unsigned char *a;
6 unsigned int *b;
7 int *c;
8 unsigned 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() warn: impossible condition '(*a == -1) => (0-255 == u32max)'
32 sm_casts2.c:22 main() warn: impossible condition '(*****d == -1) => (0-255 == u32max)'
33 * check-output-end