rosenberg_funcs: warn about information leaks to the network
[smatch.git] / validation / ptr-sub-blows.c
blobaf3d79e7c521d1f8a87a022caf303ec89259c60b
1 static int ok(int *a, int *b)
3 return a - b;
6 struct s {
7 int a, b, c;
8 };
10 static int ko(struct s *a, struct s *b)
12 return a - b;
16 * check-name: ptr-sub-blows
17 * check-command: sparse -Wptr-subtraction-blows $file
19 * check-error-start
20 ptr-sub-blows.c:12:18: warning: potentially expensive pointer subtraction
21 ptr-sub-blows.c:12:18: 'struct s' has a non-power-of-2 size: 12
22 * check-error-end