On Tue, Oct 27, 2009 at 7:32 AM, Maciej Pijanka maciej.pijanka@gmail.comwrote:
On 27/10/2009, Myles Watson mylesgw@gmail.com 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?
On begining of previous patch version, was an comment about such things, i didn't found suitable header where such utility function prototypes might be added, if its desired to make include/utils.h or something similar with better name i will move prototypes there.
Sorry, I didn't look at the first version of the patch. I think that the cleanest thing would be to have files in include that mirror the .c files. If we have to add too many new .h files, maybe we should combine some .c files.
But please note in few places prototype is just before function
because it is used only locally (for my knowledge) if not then it should be moved to header too.
If you declare it as static that will silence the warning as well. Of course this only works when it is just used locally.
Thanks, Myles