param_key: fix container of when no struct member is referenced
[smatch.git] / validation / pure-function.c
blob9692cc842b678452d37e76d0e8b353dc281b2153
2 static __attribute__((__pure__)) int pure_int(int v)
4 int i = v;
5 return i;
8 static __attribute__((__pure__)) void *pure_ptr(void *p)
10 void *i = p;
11 return i;
14 static void foo(int v, void *p)
16 int val = pure_int(v);
17 void *ptr = pure_ptr(p);
19 (void)val;
20 (void)ptr;
24 * check-name: Pure function attribute