Skip to content

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

@vszakats

Description

@vszakats

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions