conditions: use set_extra_expr_mod() to change extra states
[smatch.git] / validation / sm_inline2.c
blob51636452e0c3e7fcc5139fed7af83f1e3215afc0
1 #include <stdio.h>
2 #include <string.h>
3 #include "check_debug.h"
5 int frob(int *x)
7 *x = *x * 3;
8 return 0;
11 int *x;
12 int main(void)
14 frob(x);
15 if (x)
16 return 1;
17 return 0;
22 * check-name: smatch: inline #2
23 * check-command: smatch -I.. sm_inline2.c
25 * check-output-start
26 sm_inline2.c:15 main() warn: variable dereferenced before check 'x' (see line 14)
27 * check-output-end