[coreboot] [flashrom][PATCH] invalid local variable declaration

stephan.guilloux at free.fr stephan.guilloux at free.fr
Tue Jun 23 12:35:37 CEST 2009


Selon Stefan Reinauer <stepan at coresystems.de>:

> stephan.guilloux at free.fr wrote:
> >   Hello all,
> >
> > To start teh day, a small patch for an invalid local variable...
> > In C, local variable must be declared before any statment, and not, like in
> C++
> > in the middle of the function.
> >
> >
> Thanks a lot for the patch!
No problem ;-)

>
> The restriction of local variable declarations only working at the top
> of the function has been revised in the C99 standard. Every compiler
> that is C99 compliant will understand the code and do the right thing.
Unfortunatelly, all compiler are not C99 compliant, and this is also the
only variable declared like this in flashrom.

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






More information about the coreboot mailing list