db/fixup_kernel.sh: fix clear_user() handling
[smatch.git] / validation / constexpr-pointer-cast.c
blobbdf668c1ac60cd7f96c9dd22ec70c6531b36cb75
1 static int *a = (int*)0; // OK
2 static int b = 0;
3 static int *c = (int*)b; // KO
6 /*
7 * check-name: constexprness integer literal cast to pointer type
8 * check-command: sparse -Wconstexpr-not-const $file
10 * check-error-start
11 constexpr-pointer-cast.c:3:18: warning: non-constant initializer for static object
12 * check-error-end