"Tautological pointer comparison" build failure(s) — clang 3.4.2
Incorrect code...#includegcc with -Wall also detects some of these errors but not the one involving NULL.void foo() { int arr[5]; int x; // warn on these conditionals if (foo); if (arr); if (&x); if (foo == NULL); if (arr == NULL); if (&x == NULL); } void f(int &x) { if (&x == nullptr) { } }
| Package | Version | Supposed error message | Full log | Bug report |
|---|---|---|---|---|
| hidrd | 0.2.0-11 | page.h:225:14: error: comparison of constant 65280 with expression of type 'hidrd_usage_page' (aka 'enum hidrd_usage_page') is always false [-Werror,-Wtautological-constant-out-of-range-compare] | Log | |
| libdvbpsi | 1.2.0-1 | test_dr.c:49:3: error: comparison of constant 12 with expression of type 'bool' is always true [-Werror,-Wtautological-constant-out-of-range-compare] | Log | |
| open-vm-tools | 2:9.4.0-1280544-8 | hgfsServer.c:5630:30: error: comparison of constant 255 with expression of type 'HgfsOp' is always false [-Werror,-Wtautological-constant-out-of-range-compare] | Log | |
| spout | 1.4-2 | spout.c:982:25: error: comparison of constant 128 with expression of type 'char' is always true [-Werror,-Wtautological-constant-out-of-range-compare] | Log |
4 errors