"Tautological pointer comparison" build failure(s) — clang 5.0
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 |
|---|---|---|---|---|
| cups-bjnp | 2.0-1 | bjnp-commands.c:187:9: error: comparison of array 'printer_id' not equal to a null pointer is always true [-Werror,-Wtautological-pointer-compare] | Log | |
| librcsb-core-wrapper | 1.005-4 | src/TableFile.C:357:11: error: reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true [-Werror,-Wtautological-undefined-compare] | Log | |
| w1retap | 1.4.4-3 | weather.c:382:13: error: comparison of array 'wet->ds2401' equal to a null pointer is always false [-Werror,-Wtautological-pointer-compare] | Log |
3 errors