[3.16-stable,87/87] MIPS: elf2ecoff: Fix warning due to dead code.

Message ID 20170505194745.3627137-88-arnd@arndb.de
State New
Headers show
Series
  • build warnings and errors
Related show

Commit Message

Arnd Bergmann May 5, 2017, 7:47 p.m.
From: Ralf Baechle <ralf@linux-mips.org>


Commit 8cf6adea726b0e4abcc982b6e7e29915a620c90c upstream.

  HOSTCC  arch/mips/boot/elf2ecoff
arch/mips/boot/elf2ecoff.c: In function ‘main’:
arch/mips/boot/elf2ecoff.c:271:8: warning: variable ‘shstrtab’ set but not used [-Wunused-but-set-variable]
  char *shstrtab;

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 arch/mips/boot/elf2ecoff.c | 4 ----
 1 file changed, 4 deletions(-)

-- 
2.9.0

Patch hide | download patch | download mbox

diff --git a/arch/mips/boot/elf2ecoff.c b/arch/mips/boot/elf2ecoff.c
index 8585078ae50e..bef06453edc0 100644
--- a/arch/mips/boot/elf2ecoff.c
+++ b/arch/mips/boot/elf2ecoff.c
@@ -267,7 +267,6 @@  int main(int argc, char *argv[])
 	Elf32_Ehdr ex;
 	Elf32_Phdr *ph;
 	Elf32_Shdr *sh;
-	char *shstrtab;
 	int i, pad;
 	struct sect text, data, bss;
 	struct filehdr efh;
@@ -335,9 +334,6 @@  int main(int argc, char *argv[])
 				     "sh");
 	if (must_convert_endian)
 		convert_elf_shdrs(sh, ex.e_shnum);
-	/* Read in the section string table. */
-	shstrtab = saveRead(infile, sh[ex.e_shstrndx].sh_offset,
-			    sh[ex.e_shstrndx].sh_size, "shstrtab");
 
 	/* Figure out if we can cram the program header into an ECOFF
 	   header...  Basically, we can't handle anything but loadable