mongodb-labs / python-bsonjs

A fast BSON to MongoDB Extended JSON converter for Python - This Repository is NOT a supported MongoDB product
Apache License 2.0
40 stars 10 forks source link

Windows Python 3.8 compile warnings in libbson 1.17.0 #23

Closed ShaneHarvey closed 1 year ago

ShaneHarvey commented 4 years ago

Windows Python 3.8 compile warnings in libbson 1.17.0:

$ /cygdrive/c/python/Python38/python setup.py build_ext -i
running build_ext
building 'bsonjs' extension
creating build
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\src
creating build\temp.win-amd64-3.8\Release\src\bson
creating build\temp.win-amd64-3.8\Release\src\common
creating build\temp.win-amd64-3.8\Release\src\jsonsl
...
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.25.28610\bin\HostX64\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DBSON_COMPILATION=1 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -IC:\python\Python38\include -IC:\python\Python38\includ
e "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.25.28610\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.25.28610\ATLMFC\Include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.
18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\
4.7.2\include\um" /Tcsrc\bson\bson-atomic.c /Fobuild\temp.win-amd64-3.8\Release\src\bson\bson-atomic.obj
bson-atomic.c
src\bson\bson-atomic.c(93): warning C4133: 'function': incompatible types - from 'volatile int64_t *' to 'volatile LONG *'
src\bson\bson-atomic.c(93): warning C4244: 'function': conversion from 'int64_t' to 'LONG', possible loss of data

src\bson\bson-context.c(290): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data

src\bson\bson-decimal128.c(176): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
src\bson\bson-decimal128.c(180): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
src\bson\bson-decimal128.c(629): warning C4267: '-=': conversion from 'size_t' to 'int32_t', possible loss of data

src\bson\bson-iter.c(114): warning C4267: '=': conversion from 'size_t' to 'uint32_t', possible loss of data

src\bson\bson-json.c(617): warning C4146: unary minus operator applied to unsigned type, result still unsigned
src\bson\bson-json.c(1069): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
src\bson\bson-json.c(2090): warning C4018: '<': signed/unsigned mismatch
src\bson\bson-json.c(2091): warning C4018: '<': signed/unsigned mismatch

src\bson\bson-timegm.c(488): warning C4244: '+=': conversion from 'const int64_t' to 'int_fast32_t', possible loss of data

src\jsonsl\jsonsl.c(921): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
src\jsonsl\jsonsl.c(959): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
ShaneHarvey commented 4 years ago

I filed this issue upstream: https://jira.mongodb.org/browse/CDRIVER-3776

behackett commented 2 years ago

Added, then removed, the 0.3.0 milestone. The upstream ticket is unresolved.