Hi all,
thanks for your replies, but unfortunately they did not answer my original question whether these warnings
are harmless and can be ignored or not. These warnings reported by the VS C++ compiler are about
"possible loss of data", so it is a situation when a "int64" expression result is
assigned to an "int" variable for example. In such cases these warnings are very legitimate. If
such an assignment is the real intention of the programmer, an explicit (int) typecast should be added,
because it will
- tell to the rest of the world, that the programmer knows what he is doing, ie. he
really wants to "truncate" the result,
- eliminate compiler warnings of this type.
There are only 5 warning of this type in the entire code base, so that should
be an easy fix.
Alex
______________________________________________________________
Od: "Simon Slavin" <slav...@bigfraud.org>
Komu: <f...@cetussoft.com>, General Discussion of SQLite Database
<sqlite-users@sqlite.org>
Datum: 07.04.2013 20:05
Předmět: Re: [sqlite] 64bit compatibility warnings
On 7 Apr 2013, at 6:26pm, f...@cetussoft.com wrote:
I think that in general it might be a good idea to update the code to
not produce any 64 bit portability warnings, so that we know for sure,
that compiling 64 bit does not introduce any 64 bit side effects or possible
bugs.
...as long as doing so does not break 32-bit code...
One of the problems with compiler warnings is that different compilers generate warnings about
different things. So it's not "Get rid of 64-bit warnings" it's "Try to get rid of
64--bit warnings in GCC without creating more of them in LCC and Visual C+, and try to get rid of
them with all the different directives most people use most of the time.". And it turns out
that this is very difficult:
<http://www.sqlite.org/faq.html#q17 <http://www.sqlite.org/faq.html#q17>>
Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
<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