With gcc 4.6.0 (20110530) and ld version 2.21.52.0.1-5.fc16 I get the following compilation errors/warnings:
Working around non-functional -combine Working around non-functional -combine Working around non-functional -combine Build Kconfig config file Compiling whole program out/ccode.16.s Compiling to assembler out/asm-offsets.s In file included from out/ccode.16.s.tmp.c:35:0: out/../src/ahci.c: In function ‘ahci_detect’: out/../src/ahci.c:411:25: warning: variable ‘port’ set but not used [-Wunused-but-set-variable] Compiling whole program out/ccode32flat.o Compiling whole program out/code32seg.o Generating offset file out/asm-offsets.h Compiling (16bit) out/code16.o In file included from out/ccode32flat.o.tmp.c:35:0: out/../src/ahci.c: In function ‘ahci_detect’: out/../src/ahci.c:411:25: warning: variable ‘port’ set but not used [-Wunused-but-set-variable] In file included from out/ccode32flat.o.tmp.c:57:0: out/../src/bmp.c: At top level: out/../src/bmp.c:15:16: error: redefinition of ‘struct tagBITMAPFILEHEADER’ out/../src/bmp.c:15:16: note: originally defined here out/../src/bmp.c:21:3: error: conflicting types for ‘BITMAPFILEHEADER’ out/../src/bmp.c:21:3: note: previous declaration of ‘BITMAPFILEHEADER’ was here out/../src/bmp.c:21:21: error: conflicting types for ‘tagBITMAPFILEHEADER’ out/../src/bmp.c:21:21: note: previous declaration of ‘tagBITMAPFILEHEADER’ was here out/../src/bmp.c:23:16: error: redefinition of ‘struct tagBITMAPINFOHEADER’ out/../src/bmp.c:23:16: note: originally defined here out/../src/bmp.c:35:3: error: conflicting types for ‘BITMAPINFOHEADER’ out/../src/bmp.c:35:3: note: previous declaration of ‘BITMAPINFOHEADER’ was here out/../src/bmp.c:35:21: error: conflicting types for ‘tagBITMAPINFOHEADER’ out/../src/bmp.c:35:21: note: previous declaration of ‘tagBITMAPINFOHEADER’ was here out/../src/bmp.c:37:16: error: redefinition of ‘struct tagRGBQUAD’ out/../src/bmp.h:6:12: note: originally defined here out/../src/bmp.c:42:3: error: conflicting types for ‘RGBQUAD’ out/../src/bmp.c:42:3: note: previous declaration of ‘RGBQUAD’ was here out/../src/bmp.c:42:12: error: conflicting types for ‘tagRGBQUAD’ out/../src/bmp.c:42:12: note: previous declaration of ‘tagRGBQUAD’ was here out/../src/bmp.c:50:13: error: redefinition of ‘raw_data_format_adjust_24bpp’ out/../src/bmp.c:50:13: note: previous definition of ‘raw_data_format_adjust_24bpp’ was here out/../src/bmp.c:61:21: error: redefinition of ‘bmp_alloc’ out/../src/bmp.c:61:21: note: previous definition of ‘bmp_alloc’ was here out/../src/bmp.c:67:5: error: redefinition of ‘bmp_decode’ out/../src/bmp.c:67:5: note: previous definition of ‘bmp_decode’ was here out/../src/bmp.c:86:6: error: redefinition of ‘bmp_get_size’ out/../src/bmp.c:86:6: note: previous definition of ‘bmp_get_size’ was here out/../src/bmp.c:93:5: error: redefinition of ‘bmp_show’ out/../src/bmp.c:93:5: note: previous definition of ‘bmp_show’ was here make: *** [out/ccode32flat.o] Error 1 make: *** Waiting for unfinished jobs.... cp: cannot stat `out/bios.bin': No such file or directory cp: cannot stat `out/bios.bin': No such file or directory cp: cannot stat `out/bios.bin': No such file or directory cp: cannot stat `out/bios.bin': No such file or directory cp: cannot stat `out/bios.bin': No such file or directory
The following patch fixes them.
Signed-off-by: Stefan Berger stefanb@linux.vnet.ibm.com
diff --git a/Makefile b/Makefile index 2786c9e..a4ca497 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ SRC16=$(SRCBOTH) system.c disk.c font.c SRC32FLAT=$(SRCBOTH) post.c shadow.c memmap.c coreboot.c boot.c \ acpi.c smm.c mptable.c smbios.c pciinit.c optionroms.c mtrr.c \ lzmadecode.c bootsplash.c jpeg.c usb-hub.c paravirt.c \ - pci_region.c biostables.c xen.c bmp.c + pci_region.c biostables.c xen.c SRC32SEG=util.c output.c pci.c pcibios.c apm.c stacks.c
cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \ diff --git a/src/ahci.c b/src/ahci.c index fb4b70c..f7bd4b5 100644 --- a/src/ahci.c +++ b/src/ahci.c @@ -408,7 +408,6 @@ static void ahci_detect(void *data) { struct ahci_ctrl_s *ctrl = data; - struct ahci_port_s *port; u32 pnr, max; int rc;
@@ -422,7 +421,7 @@ ahci_detect(void *data) dprintf(1, "AHCI/%d: link %s\n", pnr, rc == 0 ? "up" : "down"); if (rc != 0) continue; - port = ahci_port_init(ctrl, pnr); + ahci_port_init(ctrl, pnr); } }
On Tue, Jul 12, 2011 at 07:35:24AM -0400, Stefan Berger wrote:
--- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ SRC16=$(SRCBOTH) system.c disk.c font.c SRC32FLAT=$(SRCBOTH) post.c shadow.c memmap.c coreboot.c boot.c \ acpi.c smm.c mptable.c smbios.c pciinit.c optionroms.c mtrr.c \ lzmadecode.c bootsplash.c jpeg.c usb-hub.c paravirt.c \
- pci_region.c biostables.c xen.c bmp.c
- pci_region.c biostables.c xen.c
SRC32SEG=util.c output.c pci.c pcibios.c apm.c stacks.c
Thanks. I committed a similar fix - bmp.c only needs to be compiled in 32bit mode.
--- a/src/ahci.c +++ b/src/ahci.c @@ -408,7 +408,6 @@ static void ahci_detect(void *data) { struct ahci_ctrl_s *ctrl = data;
- struct ahci_port_s *port;
There's a bunch of patches pending on ahci - lets wait for them before fixing the warnings.
-Kevin