| Summary: | 's390x: ordered comparison of pointer with integer zero' compiler warnings in test code | ||
|---|---|---|---|
| Product: | [Developer tools] valgrind | Reporter: | correctmost <cmbugz> |
| Component: | general | Assignee: | Florian Krohm <flo2030> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | flo2030 |
| Priority: | NOR | ||
| Version First Reported In: | 3.25 GIT | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
Sorry, I accidentally middle-clicked before submitting. The "GCC reports tskip_digitshe" text should say "GCC reports the". And the arrows in the compiler warnings should point to the < signs. Good catch! Thanks for the report. We don't compile with -Wextra (except in a few testsuite buckets). But maybe we should consider it. I'll take a look later today. Fixed in 685affd00645ea5d4492897d372e457bfc8cf838.
As for -Wextra.... the fallout is:
2948 warnings
521 -Wsign-compare
1613 -Wunused-parameter
44 -Wtype-limits
747 -Wmissing-field-initializers
17 -Wcast-function-type
4 -Wclobbered
2 -Wextra (as reported)
I sampled a few and none of those I'd want to fix.
Might be worthwhile, though, to make a run with -Wextra as part of release festivities.
|
SUMMARY GCC reports tskip_digitshe following warnings in none/tests/s390x/disasm-test/opcode.c: opcode.c: In function ‘parse_int’: opcode.c:1411:27: warning: ordered comparison of pointer with integer zero [-Wextra] 1411 | if (is_unsigned && val < 0) { | ^ opcode.c:1415:27: warning: ordered comparison of pointer with integer zero [-Wextra] 1415 | return skip_digits(val < 0 ? p + 1 : p); | ^ Looking at the code, it does seem like *val should be used instead. SOFTWARE/OS VERSIONS Commit 64beb80 compiled on Arch Linux