diff options
| author | Alastair Reid | 2019-01-04 10:55:19 +0000 |
|---|---|---|
| committer | Alastair Reid | 2019-01-04 10:55:19 +0000 |
| commit | 36d876fd74d8fdcb9bb54a4c0aa220f0ab14e5da (patch) | |
| tree | 1814531462c14bf47fbfc403733282e2f4e8fe34 /lib | |
| parent | ed4ed7e7e0373d33c6aa3ed6566d0eee28ff0c91 (diff) | |
C library: fix fprintf warnings in lib/elf.c
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/elf.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -411,7 +411,7 @@ int lookupSymbol(const char *buffer, const int total_file_size, const char *symn Elf32_Ehdr *ehdr = (Elf32_Ehdr*) &buffer[0]; if (total_file_size < rdOff32(le, ehdr->e_shoff) + rdHalf32(le, ehdr->e_shnum)*sizeof(Elf32_Shdr)) { - fprintf(stderr, "File too small for %d sections from offset %d\n", + fprintf(stderr, "File too small for %d sections from offset %ud\n", rdHalf32(le, ehdr->e_shnum), rdOff32(le, ehdr->e_shoff)); exit(EXIT_FAILURE); } @@ -468,7 +468,7 @@ int lookupSymbol(const char *buffer, const int total_file_size, const char *symn Elf64_Ehdr *ehdr = (Elf64_Ehdr*) &buffer[0]; if (total_file_size < rdOff64(le, ehdr->e_shoff) + rdHalf64(le, ehdr->e_shnum)*sizeof(Elf64_Shdr)) { - fprintf(stderr, "File too small for %d sections from offset %ld\n", + fprintf(stderr, "File too small for %d sections from offset %llu\n", rdHalf64(le, ehdr->e_shnum), rdOff64(le, ehdr->e_shoff)); exit(EXIT_FAILURE); } |
