[coreboot] small patch for prototypes and unused variables

Stefan Reinauer stepan at coresystems.de
Wed Oct 28 11:24:40 CET 2009


Myles Watson wrote:
> Maciej,
>
> Thanks for the patch.  I think most of it is ready to be committed.
>
> Index: src/lib/clog2.c
> ===================================================================
> --- src/lib/clog2.c	(revision 4869)
> +++ src/lib/clog2.c	(working copy)
> @@ -7,6 +7,8 @@
>  /* Assume 8 bits per byte */
>  #define CHAR_BIT 8
>  
> +unsigned long log2(unsigned long x);
> +
>  unsigned long log2(unsigned long x)
>  {
>          // assume 8 bits per byte.
>
> Things like this make me wonder if we should just turn off the warning.  Is
> there a header file where we can put some of these prototypes?
>   
No, we should not turn off the warning. It's the "Is our API correct?"
warning. We had very ugly bugs because of different prototypes in
different .c files.

Yes, there are many header files,.. check src/include for a fitting one.
If there is none, we should think about creating one.




-- 
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