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.