Fix warnings in load_elf{32,64}()
authorTony Breeds <tony@bakeyournoodle.com>
Tue, 12 Jun 2012 04:56:25 +0000 (14:56 +1000)
committerTony Breeds <tony@bakeyournoodle.com>
Mon, 13 May 2013 05:03:24 +0000 (15:03 +1000)
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
second/yaboot.c

index 469b1afa0adddbb292dd0dbdc1befaee6927824a..ec0c0859d71813be46db27937154583b744c6a2a 100644 (file)
@@ -1197,7 +1197,7 @@ load_elf32(struct boot_file_t *file, loadinfo_t *loadinfo)
 {
      int                       i;
      Elf32_Ehdr                *e = &(loadinfo->elf.elf32hdr);
-     Elf32_Phdr                *p, *ph;
+     Elf32_Phdr                *p, *ph = NULL;
      int                       size = sizeof(Elf32_Ehdr) - sizeof(Elf_Ident);
      unsigned long     loadaddr;
 
@@ -1330,7 +1330,7 @@ load_elf64(struct boot_file_t *file, loadinfo_t *loadinfo)
 {
      int                       i;
      Elf64_Ehdr                *e = &(loadinfo->elf.elf64hdr);
-     Elf64_Phdr                *p, *ph;
+     Elf64_Phdr                *p, *ph = NULL;
      int                       size = sizeof(Elf64_Ehdr) - sizeof(Elf_Ident);
      unsigned long     loadaddr;