diff options
author | Simon Horman <horms@verge.net.au> | 2011-03-30 08:30:57 +0900 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2011-03-30 12:06:20 +0900 |
commit | be0bc752a57a7134714f41241b7c5411e5afc5ba (patch) | |
tree | 5c6640f2bdbede5ef1b7f2b2ed74c73dab6c8fc8 | |
parent | 8880e5b8a295788dcae8f5cc038de92cd97b6807 (diff) |
Remove assigned but otherwise unused variables
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | kexec/arch/x86_64/kexec-elf-x86_64.c | 3 | ||||
-rw-r--r-- | kexec/kexec.c | 4 | ||||
-rw-r--r-- | vmcore-dmesg/vmcore-dmesg.c | 3 |
3 files changed, 2 insertions, 8 deletions
diff --git a/kexec/arch/x86_64/kexec-elf-x86_64.c b/kexec/arch/x86_64/kexec-elf-x86_64.c index 09402d9..fe4b76b 100644 --- a/kexec/arch/x86_64/kexec-elf-x86_64.c +++ b/kexec/arch/x86_64/kexec-elf-x86_64.c @@ -90,7 +90,6 @@ int elf_x86_64_load(int argc, char **argv, const char *buf, off_t len, const char *append = NULL; char *command_line = NULL, *modified_cmdline; int command_line_len; - int modified_cmdline_len; const char *ramdisk; unsigned long entry, max_addr; int arg_style; @@ -120,7 +119,6 @@ int elf_x86_64_load(int argc, char **argv, const char *buf, off_t len, */ arg_style = ARG_STYLE_ELF; modified_cmdline = 0; - modified_cmdline_len = 0; ramdisk = 0; while((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) { switch(opt) { @@ -174,7 +172,6 @@ int elf_x86_64_load(int argc, char **argv, const char *buf, off_t len, COMMAND_LINE_SIZE); modified_cmdline[COMMAND_LINE_SIZE - 1] = '\0'; } - modified_cmdline_len = strlen(modified_cmdline); } /* Load the ELF executable */ diff --git a/kexec/kexec.c b/kexec/kexec.c index 10ad41d..2515c07 100644 --- a/kexec/kexec.c +++ b/kexec/kexec.c @@ -815,9 +815,7 @@ static int my_shutdown(void) */ static int my_exec(void) { - int result; - - result = kexec_reboot(); + kexec_reboot(); /* I have failed if I make it here */ fprintf(stderr, "kexec failed: %s\n", strerror(errno)); diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c index 365e293..4c1475c 100644 --- a/vmcore-dmesg/vmcore-dmesg.c +++ b/vmcore-dmesg/vmcore-dmesg.c @@ -79,7 +79,7 @@ static void read_elf32(int fd) { Elf32_Ehdr ehdr32; Elf32_Phdr *phdr32; - size_t phdrs32_size, phdrs_size; + size_t phdrs32_size; ssize_t ret, i; ret = pread(fd, &ehdr32, sizeof(ehdr32), 0); @@ -114,7 +114,6 @@ static void read_elf32(int fd) exit(12); } phdrs32_size = ehdr.e_phnum * sizeof(Elf32_Phdr); - phdrs_size = ehdr.e_phnum * sizeof(Elf64_Phdr); phdr32 = calloc(ehdr.e_phnum, sizeof(Elf32_Phdr)); if (!phdr32) { fprintf(stderr, "Calloc of %u phdrs32 failed: %s\n", |