check_signed: check int types as well
[smatch.git] / validation / sm_dev_hold.c
blob201a78c39eae32517fefad6fe0480ee9ad04d4d5
1 void dev_hold(int *x);
3 void dev_put(int *x){}
5 extern int y,z;
7 int func (void)
9 int *x;
11 dev_hold(x);
12 if (y) {
13 dev_put(x);
14 return -1;
16 if (z) {
17 return -1;
19 return 0;
22 * check-name: dev_hold() check
23 * check-command: smatch --project=kernel sm_dev_hold.c
25 * check-output-start
26 sm_dev_hold.c +17 func(10) warn: 'x' held on error path.
27 * check-output-end