r160 - trunk
Petter Reinholdtsen
pere at moszumanska.debian.org
Sun Jan 12 07:04:06 UTC 2014
Author: pere
Date: 2014-01-12 07:04:06 +0000 (Sun, 12 Jan 2014)
New Revision: 160
Modified:
trunk/elf.c
Log:
Cast section size to size_t, to avoid warning from clang and use the largest type when comparing two ints of different type.
Modified: trunk/elf.c
===================================================================
--- trunk/elf.c 2014-01-11 22:27:32 UTC (rev 159)
+++ trunk/elf.c 2014-01-12 07:04:06 UTC (rev 160)
@@ -86,10 +86,10 @@
}
sz_phdr = is_e32() ? sizeof(Elf32_Phdr) : sizeof(Elf64_Phdr);
- if (EHDR_PHS(e_phentsize) != sz_phdr)
+ if ((size_t)EHDR_PHS(e_phentsize) != sz_phdr)
{
- fprintf(stderr, "section size was read as %d, not %d!\n",
- (int)EHDR_PHS(e_phentsize), (int)sz_phdr);
+ fprintf(stderr, "section size was read as %zd, not %zd!\n",
+ (size_t)EHDR_PHS(e_phentsize), sz_phdr);
close(fd);
return -1;
}
More information about the Chrpath-commits
mailing list