xref: /illumos-gate/usr/src/tools/smatch/src/validation/compare-null-to-int.c (revision a02120c4550735e4c33259ff2671a5ef9d06c5cc)
1 static unsigned int comparison = (void *)0 == 1;
2 /*
3  * check-name: Compare null pointer constant to int
4  * check-description: Sparse used to allow this.
5  *
6  * check-error-start
7 compare-null-to-int.c:1:44: error: incompatible types for operation (==)
8 compare-null-to-int.c:1:44:    left side has type void *
9 compare-null-to-int.c:1:44:    right side has type int
10  * check-error-end
11  */
12