who knows, but we do things to keep gcc happy anyway. just set phdr to null in the declaration.
ron
On Sat, May 30, 2015 at 11:50 PM Anatol Pomozov anatol.pomozov@gmail.com wrote:
Hi
I am trying to compile coreboot cbfstool on Arch where gcc 5.1 is used. And I see following compilation error. I wonder if it is coreboot or gcc issue.
==> Starting build()... make: Entering directory '/home/anatol/sources/archpackages/coreboot-utils-git/src/coreboot/util/cbfstool' mkdir -p ./ cc -D_FORTIFY_SOURCE=2 -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L -Iflashmap -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -g3 -std=c99 -Werror -Wall -Wextra -Wcast-qual -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings -c -o rmodule.o rmodule.c rmodule.c: In function ‘rmodule_create’: rmodule.c:286:29: error: ‘phdr’ may be used uninitialized in this function [-Werror=maybe-uninitialized] (phdr->p_vaddr + phdr->p_memsz))) { ^ rmodule.c:203:14: note: ‘phdr’ was declared here Elf64_Phdr *phdr; ^ cc1: all warnings being treated as errors Makefile:55: recipe for target 'rmodule.o' failed make: *** [rmodule.o] Error 1 make: Leaving directory '/home/anatol/sources/archpackages/coreboot-utils-git/src/coreboot/util/cbfstool' ==> ERROR: A failure occurred in build(). -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot