Issue5134
This issue tracker has been migrated to GitHub,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2009-02-02 18:52 by rhettinger, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Files | ||||
---|---|---|---|---|
File name | Uploaded | Description | Edit | |
sqlite3_warnings.patch | amaury.forgeotdarc, 2009-02-03 09:33 | |||
sqlite.patch | loewis, 2009-02-07 15:45 |
Messages (13) | |||
---|---|---|---|
msg80983 - (view) | Author: Raymond Hettinger (rhettinger) * | Date: 2009-02-02 18:52 | |
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: '=' : conversion from 'i64' to 'u32', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(25577) : warning C4244: '=' : conversion from 'i64' to 'u32', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(25592) : warning C4018: '<' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(25696) : warning C4244: '=' : conversion from 'i64' to 'u32', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(25712) : warning C4244: '=' : conversion from 'i64' to 'u32', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(25921) : warning C4018: '>' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(26221) : warning C4244: '=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(26228) : warning C4244: '=' : conversion from 'i64' to 'Pgno', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(26230) : warning C4244: 'return' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(26314) : warning C4018: '<=' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(26743) : warning C4018: '<=' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(28366) : warning C4018: '<=' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(30256) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(30258) : warning C4244: 'function' : conversion from 'i64' to 'u32', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(30946) : warning C4244: '=' : conversion from 'u16' to 'unsigned char', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(31766) : warning C4244: '=' : conversion from 'u16' to 'unsigned char', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(32268) : warning C4018: '>' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(32268) : warning C4018: '<=' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(32933) : warning C4018: '<=' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(33050) : warning C4244: '=' : conversion from 'i64' to 'u32', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(33055) : warning C4018: '>' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(33251) : warning C4244: '=' : conversion from 'i64' to 'u32', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(33258) : warning C4018: '>' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(33601) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(33651) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(33653) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(33658) : warning C4244: 'function' : conversion from 'i64' to 'u32', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(33659) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(33918) : warning C4018: '<=' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(34054) : warning C4018: '>' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(34237) : warning C4018: '>' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(34308) : warning C4244: '+=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(34310) : warning C4244: '=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(34483) : warning C4244: '=' : conversion from 'u16' to 'u8', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(34565) : warning C4244: '=' : conversion from 'u16' to 'u8', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(35959) : warning C4018: '>' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(36488) : warning C4244: '+=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(36784) : warning C4244: '=' : conversion from 'i64' to 'Pgno', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(36833) : warning C4244: 'initializing' : conversion from 'sqlite3_int64' to 'Pgno', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(36910) : warning C4244: 'initializing' : conversion from 'i64' to 'Pgno', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(37371) : warning C4244: '=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(37379) : warning C4244: 'function' : conversion from 'i64' to 'size_t', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(37380) : warning C4244: '+=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(37731) : warning C4244: '+=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(37913) : warning C4244: '=' : conversion from 'const i64' to 'double', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(37918) : warning C4244: '=' : conversion from 'const i64' to 'double', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(38257) : warning C4244: 'return' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(40178) : warning C4244: 'return' : conversion from 'i64' to 'u32', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(40194) : warning C4244: '+=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(40301) : warning C4244: '=' : conversion from 'u64' to 'u8', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(40315) : warning C4244: '+=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(40470) : warning C4018: '<' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(40554) : warning C4018: '>=' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(40579) : warning C4018: '<' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(40627) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(40672) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(41018) : warning C4244: 'return' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(41198) : warning C4244: '=' : conversion from 'double' to 'i64', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(41228) : warning C4244: '=' : conversion from 'double' to 'u64', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(43078) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(43088) : warning C4244: '=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(43183) : warning C4244: '=' : conversion from 'i64' to 'double', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(43924) : warning C4244: '=' : conversion from 'i64' to 'u32', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(43945) : warning C4018: '>' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(43983) : warning C4018: '>=' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(44001) : warning C4018: '<' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(44018) : warning C4018: '<' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(44206) : warning C4244: '+=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(44229) : warning C4244: 'function' : conversion from 'u64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(44241) : warning C4244: 'function' : conversion from 'u64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(44246) : warning C4244: '=' : conversion from 'u64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(44463) : warning C4244: '=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(44467) : warning C4244: '=' : conversion from 'i64' to 'u8', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(44603) : warning C4244: '=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(45373) : warning C4244: '=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(45517) : warning C4244: '=' : conversion from 'i64' to 'u32', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(45520) : warning C4018: '>' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(46131) : warning C4244: '=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(46137) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(46563) : warning C4244: '=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(46564) : warning C4244: '=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(57437) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(57473) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(58001) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(58273) : warning C4244: 'initializing' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(58274) : warning C4244: 'initializing' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(58275) : warning C4244: 'initializing' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(71347) : warning C4244: '=' : conversion from 'u16' to 'unsigned char', possible loss of data |
|||
msg81002 - (view) | Author: Martin v. Löwis (loewis) * | Date: 2009-02-02 21:46 | |
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. |
|||
msg81031 - (view) | Author: Gerhard Häring (ghaering) * | Date: 2009-02-03 08:39 | |
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. [...] """ |
|||
msg81032 - (view) | Author: Gerhard Häring (ghaering) * | Date: 2009-02-03 08:42 | |
I propose to either close this as wontfix. I don't know the switches for the Microsoft compiler to disable the warnings myself. |
|||
msg81034 - (view) | Author: Raymond Hettinger (rhettinger) * | Date: 2009-02-03 08:50 | |
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. |
|||
msg81037 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * | Date: 2009-02-03 09:33 | |
The attached patch sets the /W1 flag for the sqlite3 project. |
|||
msg81045 - (view) | Author: Ulrich Eckhardt (eckhardt) | Date: 2009-02-03 11:36 | |
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. |
|||
msg81084 - (view) | Author: Martin v. Löwis (loewis) * | Date: 2009-02-03 18:53 | |
> 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. |
|||
msg81254 - (view) | Author: Ulrich Eckhardt (eckhardt) | Date: 2009-02-06 09:31 | |
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! |
|||
msg81318 - (view) | Author: Martin v. Löwis (loewis) * | Date: 2009-02-06 23:43 | |
> 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? |
|||
msg81337 - (view) | Author: Martin v. Löwis (loewis) * | Date: 2009-02-07 15:45 | |
Here is a patch that works similar to sqlite3_warnings, but moves all sqlite3.dll settings into a separate property file. |
|||
msg81454 - (view) | Author: Ulrich Eckhardt (eckhardt) | Date: 2009-02-09 10:31 | |
"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. |
|||
msg81548 - (view) | Author: Martin v. Löwis (loewis) * | Date: 2009-02-10 13:22 | |
Fixed in r69489, r69490, r69491, r69492, r69493. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:45 | admin | set | github: 49384 |
2009-02-10 13:22:11 | loewis | set | status: open -> closed resolution: fixed messages: + msg81548 |
2009-02-09 10:31:58 | eckhardt | set | messages: + msg81454 |
2009-02-07 15:45:59 | loewis | set | files:
+ sqlite.patch messages: + msg81337 |
2009-02-06 23:43:52 | loewis | set | messages: + msg81318 |
2009-02-06 09:31:14 | eckhardt | set | messages: + msg81254 |
2009-02-03 18:53:32 | loewis | set | messages: + msg81084 |
2009-02-03 11:36:49 | eckhardt | set | nosy:
+ eckhardt messages: + msg81045 |
2009-02-03 09:33:35 | amaury.forgeotdarc | set | files:
+ sqlite3_warnings.patch nosy: + amaury.forgeotdarc messages: + msg81037 keywords: + patch |
2009-02-03 08:50:47 | rhettinger | set | assignee: ghaering -> loewis messages: + msg81034 |
2009-02-03 08:42:41 | ghaering | set | messages: + msg81032 |
2009-02-03 08:39:30 | ghaering | set | messages: + msg81031 |
2009-02-02 21:46:03 | loewis | set | nosy:
+ loewis messages: + msg81002 |
2009-02-02 18:52:59 | rhettinger | create |