Ilja Booij wrote:
Necessary. The C compiler doesn't do type checking so you should fill an empty argumented function with void. Otherwise they can just pass unlimited arguments to the function.Dan Weber wrote:I guess thunderbird doesn't like copy and paste. 2004-07-01 Dan Weber <[EMAIL PROTECTED]> * auth/authsql.c, db.c: replaced function definitions with 0 arguments with a void argument.Is this necessary or just good practice? If so, we can apply this later on.
The Intel Compiler claimed that res was a long long and was being converted to an unsigned on return. It said you were probably losing bytes.Why should this be a long long? I can't see the reason for it. What's the output from the Intel compiler?* db.h, mysql/dbmysql.c, pgsql/dbpgsql.c (db_num_rows): changed type cast from unsigned to long long as suggested by Intel Compiler.
Above changes. ICC is much stricter and has a much better lint than gcc, its worth a try. For non-commercial its free as in beer.* None: Made compatibility for more compilers, most notably tcc and icc.Which changes do that?
Sure. You are right, most other compilers don't use the UNUSED thing. I am sure you can make a preprocessor statement thats much smaller and concise to double preprocess.Other compiler probably cannot handle the UNUSED thingie. I hate to clutter up the sources with those #ifdef's though, as they make the code less clear & clean.* Makefile.am, auth/Makefile.am, mysql/Makefile.am (AM_CFLAGS): updated to pass a preprocessor definition at compile time if using mysql. * auth/authsql.c, db.c, db.h (db_insert_result): placed ifdef statements around places where db_insert_result is being called in an effort to not pass an unused argument to dbmysql.c's db_insert_result. * mysql/dbmysql.c (db_insert_result): replaced the UNUSED argument for db_insert_result with void, followed by changes with preprocessor to make compatibility through the source. For changes with preprocessor see above.
To conclude:Compatibility with other compilers is not so high on my list that I'm going to make changes to the current release candidate for it. I'll only make changes that are absolutely necessary.I would've like to tell you to put these patches into a bugtracker entry, but the dbmail.org and it's bugtracker are currently off-line, so that's not possible, I'm afraid. (BTW: We're working on it :) )Ilja
Dan Weber
signature.asc
Description: OpenPGP digital signature