rename del_slist_stack() to free_stack_and_slists()
[smatch.git] / validation / sm_params.c
blobbeec99bd72d0e8692b28a667d09e96349082a7ca
1 #include <stdio.h>
3 struct foo {
4 int a;
5 };
7 static void func (struct foo *aa)
9 aa->a = 1;
12 void func1 (struct foo *ab)
14 if (!ab)
15 printf("Error ad is not ALLOWED to be NULL\n");
16 ab->a = 1;
19 void bar (void)
21 struct foo *ac = returns_nonnull(sizeof(*ac));
22 struct foo *ad;
24 if(1)
25 ac = 0;
26 func(ac);
27 func1(ad);
28 func(ad);
31 * check-name: Cross function dereferences
32 * check-command: smatch sm_params.c
34 * check-output-start
35 sm_params.c +16 unchecked param func1 0
36 sm_params.c +26 cross_func deref func 0
37 sm_params.c +27 cross_func deref func1 0
38 sm_params.c +28 cross_func deref func 0
39 * check-output-end