[CDRIVER-3776] Windows VS2019 compile warnings in libbson Created: 12/Aug/20  Updated: 28/Oct/23  Resolved: 28/Mar/23

Status: Closed
Project: C Driver
Component/s: libbson
Affects Version/s: None
Fix Version/s: 1.24.0

Type: Bug Priority: Major - P3
Reporter: Shane Harvey Assignee: Ezra Chung
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CDRIVER-3777 clang 11.0.3 compile warnings in libbson Backlog
related to CDRIVER-4596 Reducing Warnings - MSVC and MinGW Wa... Closed
Epic Link: CDRIVER-4546

 Description   

As noted in https://github.com/mongodb-labs/python-bsonjs/issues/23, I see the following compile warnings in libbson 1.17.0 on Windows when building with VS2019:

$ /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.



 Comments   
Comment by Ezra Chung [ 28/Mar/23 ]

Addressed by CDRIVER-4596.

Comment by Shane Harvey [ 28/Mar/23 ]

Yes that's correct. Thanks ezra.chung@mongodb.com!

Comment by Ezra Chung [ 28/Mar/23 ]

Regarding warnings advising use of strcpy_s, we have opted to define _CRT_SECURE_NO_WARNINGS for the entire project as instructed to disable deprecation, so I do not think addressing this will be a priority for us. I suggest adding the flag to the compile options if able.

If I understand the situation correctly, this means with the exception of warnings triggered by the missing _CRT_SECURE_NO_WARNINGS compile definition, all the VS 2019 warnings initially reported should have been addressed. Can you confirm if this is the case? If so, I will close this ticket as completed and defer addressing the GCC and Clang warnings to CDRIVER-3777.

Comment by Shane Harvey [ 27/Mar/23 ]

python-bsonjs vendors libbson in a hacky way. It copies the libbson source and attempts to rely on Python.h for portability and setuptools to automatically compile the source into a Python C extension. The alternative is to build libbson the correct way and then bundle the library in the release wheels (like we do in https://github.com/mongodb-labs/mongo-arrow/). Perhaps we should finally make that switch.

Comment by Ezra Chung [ 27/Mar/23 ]

Yes. It looks like there are many compilation flags that are expected by the C Driver (per its CMakeLists.txt files) that are not being included in the compilation commands listed above, `-std=c99` being among them (see CDRIVER-4136). <stdbool.h> (as well as numerous other entities currently being used by the C Driver) is a C99 feature; it is expected to always be available. I do not fully understand why you are observing inconsistency in compilation behavior given the same source code and compile options: the "conflicting types" error is likely being caused by some parts of the compilation is seeing typedef _Bool bool per the C99 standard whereas other parts of the compilation is seeing the fallback definition as signed char.

Comment by Shane Harvey [ 27/Mar/23 ]

The only remaining windows warnings are:

    C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DBSON_COMPILATION=1 -DPy_LIMITED_API=0x03060000 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -IC:\hostedtoolcache\windows\Python\3.9.13\x64\include -IC:\hostedtoolcache\windows\Python\3.9.13\x64\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\cppwinrt /Tcsrc\bson\bson-decimal128.c /Fobuild\temp.win-amd64-3.9\Release\src\bson\bson-decimal128.obj
    bson-decimal128.c
    src\bson\bson-decimal128.c(175): 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(179): 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.

and

    C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DBSON_COMPILATION=1 -DPy_LIMITED_API=0x03060000 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -IC:\hostedtoolcache\windows\Python\3.9.13\x64\include -IC:\hostedtoolcache\windows\Python\3.9.13\x64\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\cppwinrt /Tcsrc\jsonsl\jsonsl.c /Fobuild\temp.win-amd64-3.9\Release\src\jsonsl\jsonsl.obj
    jsonsl.c
    src\jsonsl\jsonsl.c(931): 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(969): 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.

But there are still other warnings from clang and gcc as I pointed out above.

Comment by Shane Harvey [ 27/Mar/23 ]

I found the issue. python-bsonjs sets BSON_HAVE_STDBOOL_H=0. If I set it to 1 this error goes away. Is that expected?

Comment by Shane Harvey [ 27/Mar/23 ]

I can reproduce the same bson-iso8601.c error locally on macos:

clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -DBSON_COMPILATION=1 -DPy_LIMITED_API=0x03060000 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -I/Users/shane/work/pycharm/python-bsonjs/include -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c src/bson/bson-iso8601.c -o build/temp.macosx-10.9-universal2-cpython-311/src/bson/bson-iso8601.o
src/bson/bson-iso8601.c:105:1: error: conflicting types for '_bson_iso8601_date_parse'
_bson_iso8601_date_parse (const char *str,
^
src/bson/bson-iso8601-private.h:32:1: note: previous declaration is here
_bson_iso8601_date_parse (const char *str,
^

It compiles without warning or errors with 1.20.0:

    clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -DBSON_COMPILATION=1 -DPy_LIMITED_API=0x03060000 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -I/Users/shane/work/pycharm/python-bsonjs/include -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c src/bson/bson-iso8601.c -o build/temp.macosx-10.9-universal2-cpython-311/src/bson/bson-iso8601.o

Comment by Ezra Chung [ 27/Mar/23 ]

Thank you. The remaining warnings should be easily addressable.

However, that last error concerning _bson_iso8601_date_parse does not make sense. That function's declaration has not been recently modified. Can you double-check if the error is still present given a clean build?

Comment by Shane Harvey [ 27/Mar/23 ]

I see these warnings and a new error, see https://github.com/mongodb-labs/python-bsonjs/pull/47:

    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DBSON_COMPILATION=1 -DPy_LIMITED_API=0x03060000 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -I/opt/hostedtoolcache/Python/3.6.15/x64/include/python3.6m -c src/jsonsl/jsonsl.c -o build/temp.linux-x86_64-3.6/src/jsonsl/jsonsl.o
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DBSON_COMPILATION=1 -DPy_LIMITED_API=0x03060000 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -I/opt/hostedtoolcache/Python/3.6.15/x64/include/python3.6m -c src/common/common-md5.c -o build/temp.linux-x86_64-3.6/src/common/common-md5.o
    src/common/common-md5.c: In function ‘mcommon_md5_append’:
    src/common/common-md5.c:356:54: warning: signed and unsigned type in conditional expression [-Wsign-compare]
           int copy = (offset + nbytes > 64 ? 64 - offset : nbytes);
                                                          ^
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DBSON_COMPILATION=1 -DPy_LIMITED_API=0x03060000 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -I/opt/hostedtoolcache/Python/3.6.15/x64/include/python3.6m -c src/common/common-thread.c -o build/temp.linux-x86_64-3.6/src/common/common-thread.o
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DBSON_COMPILATION=1 -DPy_LIMITED_API=0x03060000 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -I/opt/hostedtoolcache/Python/3.6.15/x64/include/python3.6m -c src/common/common-b64.c -o build/temp.linux-x86_64-3.6/src/common/common-b64.o
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DBSON_COMPILATION=1 -DPy_LIMITED_API=0x03060000 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -I/opt/hostedtoolcache/Python/3.6.15/x64/include/python3.6m -c src/bson/bson-timegm.c -o build/temp.linux-x86_64-3.6/src/bson/bson-timegm.o
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DBSON_COMPILATION=1 -DPy_LIMITED_API=0x03060000 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -I/opt/hostedtoolcache/Python/3.6.15/x64/include/python3.6m -c src/bson/bson-writer.c -o build/temp.linux-x86_64-3.6/src/bson/bson-writer.o
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DBSON_COMPILATION=1 -DPy_LIMITED_API=0x03060000 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -I/opt/hostedtoolcache/Python/3.6.15/x64/include/python3.6m -c src/bson/bson.c -o build/temp.linux-x86_64-3.6/src/bson/bson.o
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DBSON_COMPILATION=1 -DPy_LIMITED_API=0x03060000 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -I/opt/hostedtoolcache/Python/3.6.15/x64/include/python3.6m -c src/bson/bson-error.c -o build/temp.linux-x86_64-3.6/src/bson/bson-error.o
    src/bson/bson-error.c: In function ‘bson_strerror_r’:
    src/bson/bson-error.c:113:8: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
        ret = strerror_r (err_code, buf, buflen);
            ^
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DBSON_COMPILATION=1 -DPy_LIMITED_API=0x03060000 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -I/opt/hostedtoolcache/Python/3.6.15/x64/include/python3.6m -c src/bson/bson-utf8.c -o build/temp.linux-x86_64-3.6/src/bson/bson-utf8.o
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DBSON_COMPILATION=1 -DPy_LIMITED_API=0x03060000 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -I/opt/hostedtoolcache/Python/3.6.15/x64/include/python3.6m -c src/bson/bson-atomic.c -o build/temp.linux-x86_64-3.6/src/bson/bson-atomic.o
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DBSON_COMPILATION=1 -DPy_LIMITED_API=0x03060000 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -I/opt/hostedtoolcache/Python/3.6.15/x64/include/python3.6m -c src/bson/bson-iter.c -o build/temp.linux-x86_64-3.6/src/bson/bson-iter.o
    src/bson/bson-iter.c: In function ‘_bson_iter_next_internal’:
    src/bson/bson-iter.c:644:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
              if (binary_len + 4 != l) {
                                 ^~
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DBSON_COMPILATION=1 -DPy_LIMITED_API=0x03060000 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -I/opt/hostedtoolcache/Python/3.6.15/x64/include/python3.6m -c src/bson/bson-iso8601.c -o build/temp.linux-x86_64-3.6/src/bson/bson-iso8601.o
    src/bson/bson-iso8601.c:105:1: error: conflicting types for ‘_bson_iso8601_date_parse’
     _bson_iso8601_date_parse (const char *str,
     ^~~~~~~~~~~~~~~~~~~~~~~~
    In file included from src/bson/bson-iso8601.c:21:0:
    src/bson/bson-iso8601-private.h:32:1: note: previous declaration of ‘_bson_iso8601_date_parse’ was here
     _bson_iso8601_date_parse (const char *str,
     ^~~~~~~~~~~~~~~~~~~~~~~~
    error: command 'gcc' failed with exit status 1

Comment by Ezra Chung [ 27/Mar/23 ]

shane.harvey@mongodb.com Can you confirm what errors remain if any after c41c3a8c (CDRIVER-4596)?

Comment by Shane Harvey [ 03/Feb/22 ]

Here are the current warnings with libbson 1.20.0 https://github.com/mongodb-labs/python-bsonjs/runs/4733813334?check_suite_focus=true#step:5:61:

 
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DBSON_COMPILATION=1 -DPy_LIMITED_API=0x03060000 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -IC:\hostedtoolcache\windows\Python\3.10.1\x64\include -IC:\hostedtoolcache\windows\Python\3.10.1\x64\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt /Tcsrc\bson\bson-context.c /Fobuild\temp.win-amd64-3.10\Release\src\bson\bson-context.obj
bson-context.c
src\bson\bson-context.c(291): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
 
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DBSON_COMPILATION=1 -DPy_LIMITED_API=0x03060000 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -IC:\hostedtoolcache\windows\Python\3.10.1\x64\include -IC:\hostedtoolcache\windows\Python\3.10.1\x64\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt /Tcsrc\bson\bson-decimal128.c /Fobuild\temp.win-amd64-3.10\Release\src\bson\bson-decimal128.obj
bson-decimal128.c
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
 
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DBSON_COMPILATION=1 -DPy_LIMITED_API=0x03060000 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -IC:\hostedtoolcache\windows\Python\3.10.1\x64\include -IC:\hostedtoolcache\windows\Python\3.10.1\x64\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt /Tcsrc\bson\bson-iter.c /Fobuild\temp.win-amd64-3.10\Release\src\bson\bson-iter.obj
bson-iter.c
src\bson\bson-iter.c(114): warning C4267: '=': conversion from 'size_t' to 'uint32_t', possible loss of data
 
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DBSON_COMPILATION=1 -DPy_LIMITED_API=0x03060000 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -IC:\hostedtoolcache\windows\Python\3.10.1\x64\include -IC:\hostedtoolcache\windows\Python\3.10.1\x64\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt /Tcsrc\bson\bson-json.c /Fobuild\temp.win-amd64-3.10\Release\src\bson\bson-json.obj
bson-json.c
src\bson\bson-json.c(631): warning C4146: unary minus operator applied to unsigned type, result still unsigned
src\bson\bson-json.c(1187): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
src\bson\bson-json.c(2186): warning C4018: '<': signed/unsigned mismatch
src\bson\bson-json.c(2187): warning C4018: '<': signed/unsigned mismatch
 
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DBSON_COMPILATION=1 -DPy_LIMITED_API=0x03060000 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -IC:\hostedtoolcache\windows\Python\3.10.1\x64\include -IC:\hostedtoolcache\windows\Python\3.10.1\x64\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt /Tcsrc\bson\bson-timegm.c /Fobuild\temp.win-amd64-3.10\Release\src\bson\bson-timegm.obj
bson-timegm.c
src\bson\bson-timegm.c(488): warning C4244: '+=': conversion from 'const int64_t' to 'int_fast32_t', possible loss of data
 
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DBSON_COMPILATION=1 -DPy_LIMITED_API=0x03060000 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -IC:\hostedtoolcache\windows\Python\3.10.1\x64\include -IC:\hostedtoolcache\windows\Python\3.10.1\x64\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt /Tcsrc\bson\bson.c /Fobuild\temp.win-amd64-3.10\Release\src\bson\bson.obj
bson.c
src\bson\bson.c(2940): warning C4018: '>=': signed/unsigned mismatch
src\bson\bson.c(2943): warning C4018: '>': signed/unsigned mismatch
 
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DBSON_COMPILATION=1 -DPy_LIMITED_API=0x03060000 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -IC:\hostedtoolcache\windows\Python\3.10.1\x64\include -IC:\hostedtoolcache\windows\Python\3.10.1\x64\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt /Tcsrc\jsonsl\jsonsl.c /Fobuild\temp.win-amd64-3.10\Release\src\jsonsl\jsonsl.obj
jsonsl.c
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.

Note we're vendoring and building libbson in a hacky way (hard coding some of bson-config.h) without using cmake or ./configure so some of these errors might not be reproducible for you.

Generated at Wed Feb 07 21:18:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.