db/fixup_kernel.sh: update vfs_write() code
[smatch.git] / validation / backend / pointer-sub.c
blob5c99f4faf088f04fe193d2e90a3fddc2fc0b062e
1 long subv0(void *p, int a) { return p - ((void*)0); }
2 long subvc(void *p, int a) { return p - ((void*)8); }
3 long subva(void *p, int a) { return p - ((void*)a); }
4 long subvq(void *p, void *q) { return p - q; }
6 long subi0(int *p, int a) { return p - ((int *)0); }
7 long subic(int *p, int a) { return p - ((int *)8); }
8 long subia(int *p, int a) { return p - ((int *)a); }
9 long subiq(int *p, int *q) { return p - q; }
11 long subvm3(void *p, int a) { return (p - ((void*)0)) * 3; }
12 long subvx3(void *p, int a) { return (p - ((void*)0)) ^ 3; }
15 * check-name: pointer-sub
16 * check-command: sparsec -Wno-int-to-pointer-cast -Wno-decl -c $file -o tmp.o