[issue5134] Compiler warnings in sqlite module

2009-02-10 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

Fixed in r69489, r69490, r69491, r69492, r69493.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5134] Compiler warnings in sqlite module

2009-02-09 Thread Ulrich Eckhardt

Ulrich Eckhardt  added the comment:

"What specific file would you put these pragmas into? Are you perhaps
proposing to change upstream code?"

I would put it into the only sourcefile there is, and yes, I would
change upstream code. Obviously, it would be better to get upstream to
incorporate those changes...

Other than that, I'm +1 for your solution using the vsprops file, which
looks clean to me.

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5134] Compiler warnings in sqlite module

2009-02-07 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

Here is a patch that works similar to sqlite3_warnings, but moves all
sqlite3.dll settings into a separate property file.

Added file: http://bugs.python.org/file12968/sqlite.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5134] Compiler warnings in sqlite module

2009-02-06 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> My approach for disabling the 
> warnings in the code has (to me) two advantages:

What specific file would you put these pragmas into?
Are you perhaps proposing to change upstream code?

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5134] Compiler warnings in sqlite module

2009-02-06 Thread Ulrich Eckhardt

Ulrich Eckhardt  added the comment:

Technically, both changes (or neither of them) generate the same 
output binaries, so I Don't Care(tm). My approach for disabling the 
warnings in the code has (to me) two advantages:
1. You immediately see that warnings are disabled. I would otherwise 
never expect that to happen in any serious project, because warnings 
are valuable.
2. You only have to do it once for the single source file, not in 
every VC project file.

Happy weekend!

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5134] Compiler warnings in sqlite module

2009-02-03 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> The syntax would be this:
> 
> #if defined(_MSC_VER)
> #  pragma warning(push)
>/* Disable warnings for this file, see
>http://www.sqlite.org/faq.html#q17 why we don't care for them. */
> #  pragma warning(disable: 4244)
> #  pragma warning(disable: 4018)
> #endif

I'd rather disable them in the project, instead of putting it into the
source code. I'd also just disable *all* warnings, since we wouldn't
fix any of them.

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5134] Compiler warnings in sqlite module

2009-02-03 Thread Ulrich Eckhardt

Ulrich Eckhardt  added the comment:

The syntax would be this:

#if defined(_MSC_VER)
#  pragma warning(push)
   /* Disable warnings for this file, see
   http://www.sqlite.org/faq.html#q17 why we don't care for them. */
#  pragma warning(disable: 4244)
#  pragma warning(disable: 4018)
#endif

...// code that produces warnings

#if defined(_MSC_VER)
#  pragma warning(pop)
#endif

For SQLite, I think the push/pop can be removed, as it is only a single
file and not just a section of code. Otherwise, they are good style, in
particular in header files, because they then don't affect other code.

--
nosy: +eckhardt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5134] Compiler warnings in sqlite module

2009-02-03 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

The attached patch sets the /W1 flag for the sqlite3 project.

--
keywords: +patch
nosy: +amaury.forgeotdarc
Added file: http://bugs.python.org/file12928/sqlite3_warnings.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5134] Compiler warnings in sqlite module

2009-02-03 Thread Gerhard Häring

Gerhard Häring  added the comment:

I propose to either close this as wontfix. I don't know the switches for
the Microsoft compiler to disable the warnings myself.

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5134] Compiler warnings in sqlite module

2009-02-03 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Martin, if you can find a way to silence the compiler for the upstream
code that would be great.  If not, go ahead and close as won't fix.

--
assignee: ghaering -> loewis

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5134] Compiler warnings in sqlite module

2009-02-03 Thread Gerhard Häring

Gerhard Häring  added the comment:

This is a known issue with SQLite. It's not as bad as it looks at first
sight, though.

http://www.sqlite.org/faq.html#q17

"""
(17) I get hundreds of compiler warnings when I compile SQLite. Isn't
this a problem? Doesn't it indicate poor code quality?

Quality assurance in SQLite is done using full-coverage testing, not by
compiler warnings or other static code analysis tools. [...]
"""

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5134] Compiler warnings in sqlite module

2009-02-02 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

I don't think we should do anything about these, except perhaps for
disabling all warnings when compiling the file. These are upstream
sources, so we definitely should not "fix" them.

--
nosy: +loewis

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5134] Compiler warnings in sqlite module

2009-02-02 Thread Raymond Hettinger

New submission from Raymond Hettinger :

>From a compilation of Py3.1 r69209 :

..\..\..\sqlite-3.5.9\sqlite3.c(9702) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9703) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9813) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9814) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9817) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9818) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9819) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9820) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9835) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9836) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9838) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9881) : warning C4244: 'initializing' :
conversion from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9887) : warning C4244: '=' : conversion
from 'double' to 'time_t', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9903) : warning C4996: 'localtime': This
function or variable may be unsafe. Consider using localtime_s instead.
To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for
details.
C:\Program Files\Microsoft Visual Studio
8\VC\include\time.inl(114) : see declaration of 'localtime'
..\..\..\sqlite-3.5.9\sqlite3.c(9998) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(10004) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(10096) : warning C4244: '+=' :
conversion from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(10102) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(10108) : warning C4244: '+=' :
conversion from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(10309) : warning C4244: 'function' :
conversion from 'u64' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(10340) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(11146) : warning C4244: 'return' :
conversion from 'sqlite3_int64' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(13798) : warning C4244: '=' : conversion
from 'sqlite3_int64' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(14408) : warning C4244: 'initializing' :
conversion from 'sqlite_uint64' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(14741) : warning C4244: '=' : conversion
from 'i64' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(16514) : warning C4244: '=' : conversion
from 'u64' to 'unsigned char', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(16517) : warning C4244: '=' : conversion
from 'u64' to 'unsigned char', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(16524) : warning C4244: '=' : conversion
from 'u64' to 'u8', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(22425) : warning C4244: 'initializing' :
conversion from 'sqlite3_int64' to 'LONG', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(22426) : warning C4244: 'initializing' :
conversion from 'sqlite3_int64' to 'LONG', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(22458) : warning C4244: 'initializing' :
conversion from 'sqlite3_int64' to 'LONG', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(22459) : warning C4244: 'initializing' :
conversion from 'sqlite3_int64' to 'LONG', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(22490) : warning C4244: 'initializing' :
conversion from 'sqlite3_int64' to 'LONG', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(22491) : warning C4244: 'initializing' :
conversion from 'sqlite3_int64' to 'LONG', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(24580) : warning C4018: '>=' :
signed/unsigned mismatch
..\..\..\sqlite-3.5.9\sqlite3.c(24597) : warning C4018: '<' :
signed/unsigned mismatch
..\..\..\sqlite-3.5.9\sqlite3.c(25331) : warning C4244: 'function' :
conversion from 'i64' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(25337) : warning C4244: 'function' :
conversion from 'i64' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(25564) : warning C4244: '=' : conversi