[coreboot] warnings about shadowed variables

Stefan Reinauer stepan at coresystems.de
Thu Mar 19 02:25:59 CET 2009


besides the Ubuntu breakage, commit 4000 brought a couple of interesting
warnings that were not available before, such as those about the
shadowing of variables. This happens when a global variable is
"overwritten" with a local definition so that the global version is no
longer available in that scope, such as this one:

coreboot-v2-4017/src/arch/i386/boot/multiboot.c: In function
coreboot-v2-4017/src/arch/i386/boot/multiboot.c:81: warning: declaration
of 'mbi' shadows a global declaration
coreboot-v2-4017/src/arch/i386/boot/multiboot.c:27: warning: shadowed
declaration is here

If you see these warnings in your builds, please attempt to fix them as
they might mean that your code is accessing the wrong variables..


coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.dehttp://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866

More information about the coreboot mailing list