[freetds] going 64!

Sebastien FLAESCH sf at 4js.com
Mon Dec 17 03:10:43 EST 2007


Hi Frediano, James,

IMHO, compiler warnings are not useless.

In our project, we even have turned on -Werror, to make all warnings into errors.

You better fix (sooner or later) the problems, instead of hiding them by turning off gcc warnings.

This will improve the quality of your source code, can also be a source of happiness.

Best regards,
Seb

James K. Lowden wrote:
> Frediano Ziglio wrote:
>> Personally looking at compiler
>> output I prefer to make compiler happy with some parenthesis instead of
>> having to watch all the log checking all warnings. From
>> http://freetds.sourceforge.net/out/test/make.1.html
>>
>> bcp.c: In function 'bcp_colfmt':
>> bcp.c:479: warning: suggest parentheses around && within ||
>>
>> yes, this is a silly warning but this (from my machine)
>>
>> setnull.c: In function 'char_test':
>> setnull.c:21: warning: format '%d' expects type 'int', but argument 3
>> has type 'size_t'
> 
> Right.  That's a good illustration.  Some warnings are extremely valuable.
> printf(3) is so error-prone that C++ invented iostreams instead.  
> 
> I don't like the first warning but I don't want to change the code to make
> the compiler happy.  (I want to make me happy!)  Do you know a way to
> adjust the compiler options to turn it off instead?  
> 
> Hope the new machine treats you well.  
> 
> --jkl
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
> 



More information about the FreeTDS mailing list