Index: nlist.c =================================================================== RCS file: /cvs/src/lib/libc/gen/nlist.c,v retrieving revision 1.57 diff -u -p -r1.57 nlist.c --- nlist.c 19 Jan 2014 20:48:57 -0000 1.57 +++ nlist.c 24 Nov 2014 03:26:14 -0000 @@ -90,13 +90,13 @@ __fdnlist(int fd, struct nlist *list) struct nlist *p; caddr_t strtab; Elf_Off symoff = 0, symstroff = 0; - Elf_Word symsize = 0, symstrsize = 0; + Elf_Word symsize = 0; Elf_Sword nent, cc, i; Elf_Sym sbuf[1024]; Elf_Sym *s; Elf_Ehdr ehdr; Elf_Shdr *shdr = NULL; - Elf_Word shdr_size; + size_t shdr_size, symstrsize = 0; struct stat st; int usemalloc = 0; @@ -115,7 +115,7 @@ __fdnlist(int fd, struct nlist *list) } /* mmap section header table */ - shdr = (Elf_Shdr *)mmap(NULL, (size_t)shdr_size, PROT_READ, + shdr = (Elf_Shdr *)mmap(NULL, shdr_size, PROT_READ, MAP_SHARED|MAP_FILE, fd, (off_t) ehdr.e_shoff); if (shdr == MAP_FAILED) { usemalloc = 1; @@ -170,7 +170,7 @@ __fdnlist(int fd, struct nlist *list) return (-1); } } else { - strtab = mmap(NULL, (size_t)symstrsize, PROT_READ, + strtab = mmap(NULL, symstrsize, PROT_READ, MAP_SHARED|MAP_FILE, fd, (off_t) symstroff); if (strtab == MAP_FAILED) return (-1);