Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning: -Wshorten-64-to-32 with ngtcp2 and Windows 32-bit #11149

Closed
vszakats opened this issue May 19, 2023 · 1 comment
Closed

warning: -Wshorten-64-to-32 with ngtcp2 and Windows 32-bit #11149

vszakats opened this issue May 19, 2023 · 1 comment
Assignees
Labels
build Windows Windows-specific

Comments

@vszakats
Copy link
Member

I did this

Compiled curl-for-win for Windows x86:

clang-15 --target=i686-w64-mingw32 --sysroot=/usr/i686-w64-mingw32 -W -Wall  -fno-asynchronous-unwind-tables -O3 -pedantic -Wcast-align -Wconversion -Wdeclaration-after-statement -Wdouble-promotion -Wempty-body -Wendif-labels -Wenum-conversion -Wfloat-equal -Wignored-qualifiers -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-format-nonliteral -Wno-long-long -Wno-multichar -Wno-sign-conversion -Wno-system-headers -Wpointer-arith -Wshadow -Wsign-compare -Wstrict-prototypes -Wtype-limits -Wundef -Wunused -Wunused-const-variable -Wvla -Wwrite-strings -Wassign-enum -Wcomma -Wextra-semi-stmt -Wshift-sign-overflow -Wshorten-64-to-32  -D_UCRT -DOS=\"i686-w64-mingw32\" -DCURL_STATICLIB -DHAVE_SSL_SET0_WBIO -DHAS_ALPN -DNGHTTP2_STATICLIB -DNGHTTP3_STATICLIB -DNGTCP2_STATICLIB -DUSE_WEBSOCKETS -I. -I../include -DNDEBUG -DUSE_LIBSSH2 -I"../../libssh2/x86-ucrt/usr/include" -DUSE_OPENSSL -DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG -I"../../quictls/x86-ucrt/usr/include" -DUSE_SCHANNEL -DUSE_NGHTTP2 -I"../../nghttp2/x86-ucrt/usr/include" -DUSE_NGHTTP3 -I"../../nghttp3/x86-ucrt/usr/include" -DUSE_NGTCP2 -I"../../ngtcp2/x86-ucrt/usr/include" -DHAVE_LIBZ -I"../../zlib/x86-ucrt/usr/include" -DHAVE_ZSTD -I"../../zstd/x86-ucrt/usr/include" -DHAVE_BROTLI -I"../../brotli/x86-ucrt/usr/include" -DUSE_GSASL -I"../../gsasl/x86-ucrt/usr/include" -DUSE_WIN32_IDN -DUSE_WINDOWS_SSPI -DENABLE_IPV6 -DCURL_WITH_MULTI_SSL -DBUILDING_LIBCURL -c vquic/vquic.c -o i686-w64-windows-gnu/vquic.o
vquic/curl_ngtcp2.c:1449:36: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'size_t' (aka 'unsigned int') [-Wshorten-64-to-32]
  Curl_bufq_skip(&stream->sendbuf, datalen);
  ~~~~~~~~~~~~~~                   ^~~~~~~
1 warning generated.

Ref: https://ci.appveyor.com/project/curlorg/curl-for-win/builds/47067680#L26296

I expected the following

No warning.

curl/libcurl version

8.1.0

operating system

Windows

@icing
Copy link
Contributor

icing commented May 19, 2023

Thanks for the report. Fix in #11153.

@bagder bagder closed this as completed in 7ab94d7 May 19, 2023
bch pushed a commit to bch/curl that referenced this issue Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Windows Windows-specific
Development

No branches or pull requests

2 participants