Fix warnings in load_elf{32,64}()
[yaboot.git] / 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);
 {
      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;
 
      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);
 {
      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;
 
      int                       size = sizeof(Elf64_Ehdr) - sizeof(Elf_Ident);
      unsigned long     loadaddr;