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