I agree with Michael. Some of these warnings can be stopped with trivially
small code modifications, and they do try to prevent human error. Consider
this line (from my 3.5.9 amalgamation):

X1 = 365.25*(Y+4716); //X1 is an int

Which produces the following warning in VC++2008:

warning C4244: '=' : conversion from 'double' to 'int', possible loss of
data

This is useful. It's the compiler telling you "Watch out, a truncation is
taking place here. Was that your original intention?"

It can easily be suppressed by changing the line into:

X1 = (int) (365.25*(Y+4716)); //Yes, truncation is taking place, that's how
I want it.

So why not fix this? I can understand (and even recommend ;) using
_CRT_SECURE_NO_WARNINGS on VC++, but fixing these small ones won't hurt
anyone, and makes the code slightly easier to read for a new comer. 

- Sherief

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:sqlite-users-
> [EMAIL PROTECTED] On Behalf Of Michael Ruck
> Sent: Tuesday, October 07, 2008 11:33 AM
> To: 'General Discussion of SQLite Database'
> Subject: Re: [sqlite] Compile SQLite3 for MS Windows Driver Kit user-
> modeapplication
> 
> Dan,
> 
> While I do understand the position chosen by SQLite, these warnings do
> try
> to prevent human error. In case of Visual C++, Microsoft has added lots
> of
> tests in order to make porting code from 32-bits to 64-bits easier. And
> those
> problems Mark wrote about were certainly reported as warnings since
> 2002 -
> maybe even earlier.
> 
> The point I'm trying to make is that generally turning off warnings is
> a bad
> idea. If you dislike a warning for "stylistic purposes", that's fine -
> then
> only turn of those warnings with appropriate pragmas.
> 
> Generally hiding warnings is a mistake IMHO.
> 
> Mike
> 
> > -----Ursprüngliche Nachricht-----
> > Von: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Im Auftrag von Dan
> > Gesendet: Dienstag, 7. Oktober 2008 16:30
> > An: General Discussion of SQLite Database
> > Betreff: Re: [sqlite] Compile SQLite3 for MS Windows Driver
> > Kit user-modeapplication
> >
> > > The flood of warnings is a pain.  SQLite dev claims they are all
> > > spurious, but with so many I wouldn't venture to guess how they can
> > > tell.
> >
> >    http://www.sqlite.org/faq.html#q17
> >
> >
> > _______________________________________________
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >
> 
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to