]> git.hungrycats.org Git - linux/commitdiff
MIPS: elf2ecoff: Fix warning due to dead code.
authorRalf Baechle <ralf@linux-mips.org>
Wed, 4 Feb 2015 12:04:03 +0000 (13:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 May 2017 05:44:12 +0000 (07:44 +0200)
commit 2d76e9633b572ae5a64150b638eed77f4afc12db 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/mips/boot/elf2ecoff.c

index 51f2ed03a36aa551ce1d16a71f4142269531db49..6950fee4576cf4da2f7e35eeb07106c4411fba93 100644 (file)
@@ -268,7 +268,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;
@@ -336,9 +335,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