From 8f9713ed5390564ae25aeb378bec2b4ccc2d9981 Mon Sep 17 00:00:00 2001 From: John Reiser Date: Mon, 13 Aug 2018 18:47:42 -0700 Subject: [PATCH] Appease MSVC warning C4018: s/igned/unsigned mismatch modified: p_lx_elf.cpp --- src/p_lx_elf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp index 9264a5b2..a21e3f80 100644 --- a/src/p_lx_elf.cpp +++ b/src/p_lx_elf.cpp @@ -3435,7 +3435,7 @@ int PackLinuxElf32::pack2(OutputFile *fo, Filter &ft) } x.offset = get_te32(&phdri[k].p_offset); x.size = get_te32(&phdri[k].p_filesz); - if (!is_shlib || hdr_u_len < x.size) { + if (!is_shlib || (off_t)hdr_u_len < x.size) { if (0 == nx) { // 1st PT_LOAD32 must cover Ehdr at 0==p_offset unsigned const delta = hdr_u_len; if (ft.id < 0x40) { @@ -3559,7 +3559,7 @@ int PackLinuxElf64::pack2(OutputFile *fo, Filter &ft) } x.offset = get_te64(&phdri[k].p_offset); x.size = get_te64(&phdri[k].p_filesz); - if (!is_shlib || hdr_u_len < x.size) { + if (!is_shlib || (off_t)hdr_u_len < x.size) { if (0 == nx) { // 1st PT_LOAD64 must cover Ehdr at 0==p_offset unsigned const delta = hdr_u_len; if (ft.id < 0x40) {