From 49974076ba7084b372a9a2aa857768126093b020 Mon Sep 17 00:00:00 2001 From: darealshinji Date: Sun, 29 Nov 2015 20:14:16 +0100 Subject: Remaining sing-compare warnings Get rid of remaining sing-compare warnings that appear when using gcc 5.2. --- src/patchelf.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/patchelf.cc b/src/patchelf.cc index ac77107..1751af3 100644 --- a/src/patchelf.cc +++ b/src/patchelf.cc @@ -627,7 +627,7 @@ void ElfFile::rewriteSectionsLibrary() /* Write out the replaced sections. */ Elf_Off curOff = startOffset + phdrs.size() * sizeof(Elf_Phdr); writeReplacedSections(curOff, startPage, startOffset); - assert((off_t) curOff == startOffset + neededSpace); + assert(curOff == startOffset + neededSpace); /* Move the program header to the start of the new area. */ @@ -696,7 +696,7 @@ void ElfFile::rewriteSectionsExecutable() Elf_Addr firstPage = startAddr - startOffset; debug("first page is 0x%llx\n", (unsigned long long) firstPage); - if ((off_t) rdi(hdr->e_shoff) < startOffset) { + if (rdi(hdr->e_shoff) < startOffset) { /* The section headers occur too early in the file and would be overwritten by the replaced sections. Move them to the end of the file before proceeding. */ @@ -752,7 +752,7 @@ void ElfFile::rewriteSectionsExecutable() /* Write out the replaced sections. */ writeReplacedSections(curOff, firstPage, 0); - assert((off_t) curOff == neededSpace); + assert(curOff == neededSpace); rewriteHeaders(firstPage + rdi(hdr->e_phoff)); -- cgit v0.12