Przeglądaj źródła

fix signed/unsigned warnings

Mike Frysinger 18 lat temu
rodzic
commit
1a407ee53f
3 zmienionych plików z 6 dodań i 6 usunięć
  1. 2 2
      utils/ldconfig.c
  2. 2 2
      utils/ldd.c
  3. 2 2
      utils/readelf.c

+ 2 - 2
utils/ldconfig.c

@@ -779,10 +779,10 @@ void cache_write(void)
 
     for (cur_lib = lib_head; cur_lib != NULL; cur_lib = cur_lib->next)
     {
-	if (write(cachefd, cur_lib->soname, strlen(cur_lib->soname) + 1)
+	if ((size_t)write(cachefd, cur_lib->soname, strlen(cur_lib->soname) + 1)
 		!= strlen(cur_lib->soname) + 1)
 	    err(EXIT_FATAL,"can't write %s~ (%s)", cachefile, strerror(errno));
-	if (write(cachefd, cur_lib->libname, strlen(cur_lib->libname) + 1)
+	if ((size_t)write(cachefd, cur_lib->libname, strlen(cur_lib->libname) + 1)
 		!= strlen(cur_lib->libname) + 1)
 	    err(EXIT_FATAL,"can't write %s~ (%s)", cachefile, strerror(errno));
     }

+ 2 - 2
utils/ldd.c

@@ -191,7 +191,7 @@ inline uint64_t byteswap64_to_host(uint64_t value)
 # define byteswap_to_host(x) byteswap64_to_host(x)
 #endif
 
-ElfW(Shdr) * elf_find_section_type( int key, ElfW(Ehdr) *ehdr)
+ElfW(Shdr) * elf_find_section_type( uint32_t key, ElfW(Ehdr) *ehdr)
 {
 	int j;
 	ElfW(Shdr) *shdr;
@@ -204,7 +204,7 @@ ElfW(Shdr) * elf_find_section_type( int key, ElfW(Ehdr) *ehdr)
 	return NULL;
 }
 
-ElfW(Phdr) * elf_find_phdr_type( int type, ElfW(Ehdr) *ehdr)
+ElfW(Phdr) * elf_find_phdr_type( uint32_t type, ElfW(Ehdr) *ehdr)
 {
 	int j;
 	ElfW(Phdr) *phdr = (ElfW(Phdr) *)(ehdr->e_phoff + (char *)ehdr);

+ 2 - 2
utils/readelf.c

@@ -64,7 +64,7 @@ inline uint64_t byteswap64_to_host(uint64_t value)
 # define byteswap_to_host(x) byteswap32_to_host(x)
 #endif
 
-ElfW(Shdr) * elf_find_section_type( int key, ElfW(Ehdr) *ehdr)
+ElfW(Shdr) * elf_find_section_type( uint32_t key, ElfW(Ehdr) *ehdr)
 {
 	int j;
 	ElfW(Shdr) *shdr = (ElfW(Shdr) *)(ehdr->e_shoff + (char *)ehdr);
@@ -76,7 +76,7 @@ ElfW(Shdr) * elf_find_section_type( int key, ElfW(Ehdr) *ehdr)
 	return NULL;
 }
 
-ElfW(Phdr) * elf_find_phdr_type( int type, ElfW(Ehdr) *ehdr)
+ElfW(Phdr) * elf_find_phdr_type( uint32_t type, ElfW(Ehdr) *ehdr)
 {
 	int j;
 	ElfW(Phdr) *phdr = (ElfW(Phdr) *)(ehdr->e_phoff + (char *)ehdr);