ok(int * a,int * b)1*c85f09ccSJohn Levon static int ok(int *a, int *b)
2*c85f09ccSJohn Levon {
3*c85f09ccSJohn Levon 	return a - b;
4*c85f09ccSJohn Levon }
5*c85f09ccSJohn Levon 
6*c85f09ccSJohn Levon struct s {
7*c85f09ccSJohn Levon 	int a, b, c;
8*c85f09ccSJohn Levon };
9*c85f09ccSJohn Levon 
ko(struct s * a,struct s * b)10*c85f09ccSJohn Levon static int ko(struct s *a, struct s *b)
11*c85f09ccSJohn Levon {
12*c85f09ccSJohn Levon 	return a - b;
13*c85f09ccSJohn Levon }
14*c85f09ccSJohn Levon 
15*c85f09ccSJohn Levon /*
16*c85f09ccSJohn Levon  * check-name: ptr-sub-blows
17*c85f09ccSJohn Levon  * check-command: sparse -Wptr-subtraction-blows $file
18*c85f09ccSJohn Levon  *
19*c85f09ccSJohn Levon  * check-error-start
20*c85f09ccSJohn Levon ptr-sub-blows.c:12:18: warning: potentially expensive pointer subtraction
21*c85f09ccSJohn Levon ptr-sub-blows.c:12:18:     'struct s' has a non-power-of-2 size: 12
22*c85f09ccSJohn Levon  * check-error-end
23*c85f09ccSJohn Levon  */
24