diff options
| author | Mark Wielaard <[email protected]> | 2014-11-27 00:12:32 +0100 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2014-11-27 00:15:14 +0100 |
| commit | 13a9fa3013acdc318ebd65f73a9192087a5a39ab (patch) | |
| tree | 152bf89a79e217ba572932461f368f1848721be4 /src/readelf.c | |
| parent | 020fc02c554226a914e9dd17394236eabe3f03d3 (diff) | |
readelf: Cast Dwarf_Word length to ptrdiff_t for comparison.
Avoids comparison between signed and unsigned integer expressions warning.
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'src/readelf.c')
| -rw-r--r-- | src/readelf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/readelf.c b/src/readelf.c index 00986d1e..cd15e4c0 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -4693,7 +4693,7 @@ print_debug_aranges_section (Dwfl_Module *dwflmod __attribute__ ((unused)), printf (gettext ("\n Length: %6" PRIu64 "\n"), (uint64_t) length); - if (unlikely (length > readendp - readp)) + if (unlikely ((ptrdiff_t) length > readendp - readp)) goto invalid_data; if (length == 0) |
