Skip to contentSkip to conversation

i386: elf: Fix -Wunused-but-set-variable compilation warning

PATCH Applied Ameya Palande 2 participants 3 messages Feb 12, 2015 – Feb 25, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i386: elf: Fix -Wunused-but-set-variable compilation warning

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;

---
 kexec/arch/i386/kexec-elf-x86.c | 3 ---
 1 file changed, 3 deletions(-)
kexec/arch/i386/kexec-elf-x86.c +0 -3
index d0f9838..de00dcb 100644
@@ -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 */
Signature · 7 lines
1.8.3.1


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec