[PATCH 4/7] ppc64, cleanup: cmdline_len variables are unused

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



../kexec/arch/ppc64/kexec-elf-ppc64.c:100:19: warning: variable ?modified_cmdline_len? set but not used [-Wunused-but-set-variable]
  int cmdline_len, modified_cmdline_len;
                   ^
../kexec/arch/ppc64/kexec-elf-ppc64.c:100:6: warning: variable ?cmdline_len? set but not used [-Wunused-but-set-variable]
  int cmdline_len, modified_cmdline_len;

Signed-off-by: C?dric Le Goater <clg at fr.ibm.com>
---
 kexec/arch/ppc64/kexec-elf-ppc64.c |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/kexec/arch/ppc64/kexec-elf-ppc64.c b/kexec/arch/ppc64/kexec-elf-ppc64.c
index 069d8ba6e690..7be35199c7e0 100644
--- a/kexec/arch/ppc64/kexec-elf-ppc64.c
+++ b/kexec/arch/ppc64/kexec-elf-ppc64.c
@@ -97,7 +97,6 @@ int elf_ppc64_load(int argc, char **argv, const char *buf, off_t len,
 	struct mem_ehdr ehdr;
 	char *cmdline, *modified_cmdline = NULL;
 	const char *devicetreeblob;
-	int cmdline_len, modified_cmdline_len;
 	uint64_t max_addr, hole_addr;
 	char *seg_buf = NULL;
 	off_t seg_size = 0;
@@ -164,10 +163,7 @@ int elf_ppc64_load(int argc, char **argv, const char *buf, off_t len,
 		}
 	}
 
-	cmdline_len = 0;
-	if (cmdline)
-		cmdline_len = strlen(cmdline) + 1;
-	else
+	if (!cmdline)
 		fprintf(stdout, "Warning: append= option is not passed. Using the first kernel root partition\n");
 
 	if (ramdisk && reuse_initrd)
@@ -183,7 +179,6 @@ int elf_ppc64_load(int argc, char **argv, const char *buf, off_t len,
 			strncpy(modified_cmdline, cmdline, COMMAND_LINE_SIZE);
 			modified_cmdline[COMMAND_LINE_SIZE - 1] = '\0';
 		}
-		modified_cmdline_len = strlen(modified_cmdline);
 	}
 
 retry:
@@ -234,7 +229,6 @@ retry:
 			return -1;
 		/* Use new command line. */
 		cmdline = modified_cmdline;
-		cmdline_len = strlen(modified_cmdline) + 1;
 	}
 
 	/* Add v2wrap to the current image */
-- 
1.7.10.4




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux