diff options
Diffstat (limited to 'arch/alpha/boot/tools')
| -rw-r--r-- | arch/alpha/boot/tools/mkbb.c | 7 | ||||
| -rw-r--r-- | arch/alpha/boot/tools/objstrip.c | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/arch/alpha/boot/tools/mkbb.c b/arch/alpha/boot/tools/mkbb.c index 23c7190b047..1185778e6a1 100644 --- a/arch/alpha/boot/tools/mkbb.c +++ b/arch/alpha/boot/tools/mkbb.c @@ -11,6 +11,7 @@ #include <fcntl.h> #include <unistd.h> +#include <stdlib.h> #include <stdio.h> /* Minimal definition of disklabel, so we don't have to include @@ -81,7 +82,7 @@ typedef union __bootblock { #define bootblock_label __u1.__label #define bootblock_checksum __u2.__checksum -main(int argc, char ** argv) +int main(int argc, char ** argv) { bootblock bootblock_from_disk; bootblock bootloader_image; @@ -114,7 +115,7 @@ main(int argc, char ** argv) nread = read(fd, &bootloader_image, sizeof(bootblock)); if(nread != sizeof(bootblock)) { perror("lxboot read"); - fprintf(stderr, "expected %d, got %d\n", sizeof(bootblock), nread); + fprintf(stderr, "expected %zd, got %d\n", sizeof(bootblock), nread); exit(0); } @@ -122,7 +123,7 @@ main(int argc, char ** argv) nread = read(dev, &bootblock_from_disk, sizeof(bootblock)); if(nread != sizeof(bootblock)) { perror("bootblock read"); - fprintf(stderr, "expected %d, got %d\n", sizeof(bootblock), nread); + fprintf(stderr, "expected %zd, got %d\n", sizeof(bootblock), nread); exit(0); } diff --git a/arch/alpha/boot/tools/objstrip.c b/arch/alpha/boot/tools/objstrip.c index 67beb1b45e4..367d53d031f 100644 --- a/arch/alpha/boot/tools/objstrip.c +++ b/arch/alpha/boot/tools/objstrip.c @@ -25,7 +25,6 @@ #include <linux/a.out.h> #include <linux/coff.h> #include <linux/param.h> -#include <linux/string.h> #ifdef __ELF__ # include <linux/elf.h> #endif @@ -36,7 +35,7 @@ const char * prog_name; -void +static void usage (void) { fprintf(stderr, @@ -94,7 +93,7 @@ main (int argc, char *argv[]) ofd = 1; if (i < argc) { ofd = open(argv[i++], O_WRONLY | O_CREAT | O_TRUNC, 0666); - if (fd == -1) { + if (ofd == -1) { perror("open"); exit(1); } @@ -145,7 +144,7 @@ main (int argc, char *argv[]) #ifdef __ELF__ elf = (struct elfhdr *) buf; - if (elf->e_ident[0] == 0x7f && strncmp(elf->e_ident + 1, "ELF", 3) == 0) { + if (elf->e_ident[0] == 0x7f && strncmp((char *)elf->e_ident + 1, "ELF", 3) == 0) { if (elf->e_type != ET_EXEC) { fprintf(stderr, "%s: %s is not an ELF executable\n", prog_name, inname); |
