[PATCH] i386: elf: Fix -Wunused-but-set-variable compilation warning
Ameya Palande
2ameya at gmail.com
Thu Feb 12 00:34:26 PST 2015
kexec/arch/i386/kexec-elf-x86.c:97:6: warning: variable
‘modified_cmdline_len’ set but not used [-Wunused-but-set-variable]
int modified_cmdline_len;
Signed-off-by: Ameya Palande <2ameya at gmail.com>
---
kexec/arch/i386/kexec-elf-x86.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/kexec/arch/i386/kexec-elf-x86.c b/kexec/arch/i386/kexec-elf-x86.c
index d0f9838..de00dcb 100644
--- a/kexec/arch/i386/kexec-elf-x86.c
+++ b/kexec/arch/i386/kexec-elf-x86.c
@@ -94,7 +94,6 @@ int elf_x86_load(int argc, char **argv, const char *buf, off_t len,
char *error_msg = NULL;
int result;
int command_line_len;
- int modified_cmdline_len;
const char *ramdisk;
unsigned long entry, max_addr;
int arg_style;
@@ -123,7 +122,6 @@ int elf_x86_load(int argc, char **argv, const char *buf, off_t len,
* Parse the command line arguments
*/
arg_style = ARG_STYLE_ELF;
- modified_cmdline_len = 0;
ramdisk = 0;
result = 0;
while((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
@@ -180,7 +178,6 @@ int elf_x86_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 */
--
1.8.3.1
More information about the kexec
mailing list