On 18.12.2008 15:52, Jordan Crouse wrote: > Myles Watson wrote: >> On Thu, Dec 18, 2008 at 3:18 AM, Carl-Daniel Hailfinger < >> [email protected]> wrote: >> >>> Bao, Zheng found a bug which killed SATA booting on my board. >>> >>> This happened because we do not error out on implicit function >>> declarations. The linker has no way of checking whether the implicitly >>> assumed function signature is identical to the real signature, so >>> mismatches can occur and these mismatches are practically impossible to >>> debug because the code looks completely correct. >>> >>> Adding -Werror-implicit-function-declaration to our CFLAGS would solve >>> this problem nicely, but a lot of files in the tree need to be fixed. >>> >> >> I think this is a great idea. Isn't the correct order to fix all the >> warnings, then make it an error? > > Yeah - the unfortunate thing about changes like this is that you end > up being responsible for fixing the errors.. :) > > Carl-Daniel - if you post a list of offending files, we'll all help > clear them up. Dumping the log through grep "implicit declaration of > function" should suffice.
This is the list of unfixed problems in my tree after my other patches are applied: src/cpu/amd/dualcore/dualcore.c:63: warning: implicit declaration of function 'get_nodes' src/include/cpu/x86/bist.h:13: warning: implicit declaration of function 'die' src/include/cpu/x86/bist.h:8: warning: implicit declaration of function 'printk_emerg' src/northbridge/amd/amdfam10/../amdmct/mct/mctndi_d.c:144: warning: overflow in implicit constant conversio' src/northbridge/amd/amdfam10/reset_test.c:36: warning: implicit declaration of function 'NODE_PCI' src/southbridge/nvidia/mcp55/mcp55_early_setup_car.c:27: warning: implicit declaration of function 'set_ht_link_buffer_counts_chain' src/cpu/amd/dualcore/dualcore.c:63: warning: implicit declaration of function 'get_nodes' src/cpu/amd/model_fxx/init_cpus.c:319: warning: implicit declaration of function 'soft_reset' src/mainboard/digitallogic/msm800sev/cache_as_ram_auto.c:117: warning: implicit declaration of function 'done_cache_as_ram_main' src/mainboard/emulation/qemu-x86/mainboard.c:15: warning: implicit declaration of function 'setup_realmode_idt' src/mainboard/emulation/qemu-x86/mainboard.c:17: warning: implicit declaration of function 'do_vgabios' src/mainboard/emulation/qemu-x86/mainboard.c:21: warning: implicit declaration of function 'init_pc_keyboard' src/mainboard/intel/xe7501devkit/reset.c:4: warning: implicit declaration of function 'i82801ca_hard_reset' src/mainboard/pcengines/alix1c/cache_as_ram_auto.c:209: warning: implicit declaration of function 'done_cache_as_ram_main' src/mainboard/tyan/s2735/reset.c:4: warning: implicit declaration of function 'i82801er_hard_reset' src/mainboard/via/epia-m/mainboard.c:19: warning: implicit declaration of function 'setup_realmode_idt' src/mainboard/via/epia-m/mainboard.c:21: warning: implicit declaration of function 'do_vgabios' src/mainboard/via/epia-m/vgabios.c:367: warning: implicit declaration of function 'write_protect_vgabios' src/northbridge/amd/amdk8/northbridge.c:1174: warning: implicit declaration of function 'read_nb_cfg_54' src/northbridge/amd/amdk8/northbridge.c:1242: warning: implicit declaration of function 'is_e0_later_in_bsp' src/northbridge/amd/amdk8/northbridge.c:1244: warning: implicit declaration of function 'is_cpu_f0_in_bsp' src/northbridge/amd/amdk8/raminit.c:2122: warning: implicit declaration of function 'activate_spd_rom' src/northbridge/amd/amdk8/raminit_f.c:2789: warning: implicit declaration of function 'activate_spd_rom' src/northbridge/intel/e7501/northbridge.c:163: warning: implicit declaration of function 'initialize_cpus' src/northbridge/intel/i82830/northbridge.c:166: warning: implicit declaration of function 'initialize_cpus' src/northbridge/intel/i855pm/northbridge.c:130: warning: implicit declaration of function 'initialize_cpus' src/northbridge/via/vt8601/northbridge.c:165: warning: implicit declaration of function 'initialize_cpus' src/northbridge/via/vt8623/northbridge.c:163: warning: implicit declaration of function 'setup_realmode_idt' src/northbridge/via/vt8623/northbridge.c:165: warning: implicit declaration of function 'do_vgabios' src/northbridge/via/vt8623/northbridge.c:174: warning: implicit declaration of function 'vga_enable_console' src/southbridge/intel/i82801gx/i82801gx_lpc.c:277: warning: implicit declaration of function 'setup_i8259' src/southbridge/via/vt8235/vt8235.c:76: warning: implicit declaration of function 'setup_i8259' Regards, Carl-Daniel -- http://www.hailfinger.org/ -- coreboot mailing list: [email protected] http://www.coreboot.org/mailman/listinfo/coreboot

