slice: remove unneeded nr_nrbits from EXPR_SLICE
[smatch.git] / validation / cast-weirds.c
bloba753c2989c7fe6ea85a559d9286a443f9983e2f1
1 typedef unsigned int uint;
2 typedef unsigned long ulong;
4 static int * int_2_iptr(int a) { return (int *)a; }
5 static int * uint_2_iptr(uint a) { return (int *)a; }
7 static void * int_2_vptr(int a) { return (void *)a; }
8 static void * uint_2_vptr(uint a) { return (void *)a; }
11 * check-name: cast-weirds
12 * check-command: sparse -m64 $file
13 * check-assert: sizeof(void *) == 8
15 * check-error-start
16 cast-weirds.c:4:48: warning: non size-preserving integer to pointer cast
17 cast-weirds.c:5:50: warning: non size-preserving integer to pointer cast
18 * check-error-end