| Summary: | m_libcassert.c: 'ordered comparison of pointer with integer zero' compiler warning | ||
|---|---|---|---|
| Product: | [Developer tools] valgrind | Reporter: | correctmost <cmbugz> |
| Component: | general | Assignee: | Paul Floyd <pjfloyd> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | pjfloyd |
| Priority: | NOR | ||
| Version First Reported In: | 3.27 GIT | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
Which version of GCC produces this warning? I compiled with GCC 15.2.1 20251112 from the Arch repos (gcc 15.2.1+r301+gf24307422d1d-1). It looks like a straightforward error. The compiler is complaining that we're comparing a function (which decays to a pointer to function) with integer zero. That will always be true. I just need to add parens to make it a function call and check that none of the regressioon tests need updating. commit 6f1b1f3d7d00f45bacebc2bfae667fc0ff8a461b (HEAD -> master, origin/master, origin/HEAD) Author: Paul Floyd <pjfloyd@wanadoo.fr> Date: Thu Dec 18 07:59:38 2025 +0100 Bug 513522 - m_libcassert.c: 'ordered comparison of pointer with integer zero' compiler warning |
SUMMARY GCC reports the following warning in coregrind/m_libcassert.c: m_libcassert.c: In function ‘report_and_quit’: m_libcassert.c:503:31: warning: ordered comparison of pointer with integer zero [-Wextra] 503 | if (VG_(debugLog_getLevel) > 0) { | ^ SOFTWARE/OS VERSIONS Commit 1d4182eed4d compiled on Arch Linux