From 8cce701b56d8c6f780a3d77639dc3328acfacfbe Mon Sep 17 00:00:00 2001 From: Anatol Pomozov Date: Fri, 10 Jul 2015 17:30:01 -0700 Subject: Fix GCC 5.1 compile issue seen at Linux Arch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rmodule.c: In function ‘rmodule_create’: rmodule.c:287:29: error: ‘phdr’ may be used uninitialized in this function [-Werror=maybe-uninitialized] (phdr->p_vaddr + phdr->p_memsz))) { ^ rmodule.c:204:14: note: ‘phdr’ was declared here Elf64_Phdr *phdr; ^ Change-Id: I94a235253610348484eef218ec855103a3bb5da5 Signed-off-by: Anatol Pomozov Reviewed-on: http://review.coreboot.org/10881 Tested-by: build bot (Jenkins) Reviewed-by: Francis Rowe --- util/cbfstool/rmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/cbfstool/rmodule.c b/util/cbfstool/rmodule.c index b94e0c279a..f93f4f6508 100644 --- a/util/cbfstool/rmodule.c +++ b/util/cbfstool/rmodule.c @@ -201,7 +201,7 @@ static int find_program_segment(struct rmod_context *ctx) int i; int nsegments; struct parsed_elf *pelf; - Elf64_Phdr *phdr; + Elf64_Phdr *phdr = NULL; pelf = &ctx->pelf; -- cgit v1.2.3