diff options
author | Viktor Szakats <commit@vsz.me> | 2023-02-27 00:19:58 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2023-02-28 08:43:16 +0100 |
commit | 51211a31a523e53bab4b57e1e84f81d0532c67c0 (patch) | |
tree | 00610649a76a0bdc086cba76cfcc48f80353d941 /lib/vtls | |
parent | 13afb872686e31c32a0f9bd796679fd5ff5a46a3 (diff) | |
download | curl-51211a31a523e53bab4b57e1e84f81d0532c67c0.tar.gz |
quic/schannel: fix compiler warnings
Fixes #10603
Closes #10616
Diffstat (limited to 'lib/vtls')
-rw-r--r-- | lib/vtls/schannel.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c index 452fa409a..cdd8712aa 100644 --- a/lib/vtls/schannel.c +++ b/lib/vtls/schannel.c @@ -1201,18 +1201,18 @@ schannel_connect_step1(struct Curl_cfilter *cf, struct Curl_easy *data) /* The first four bytes will be an unsigned int indicating number of bytes of data in the rest of the buffer. */ extension_len = (unsigned int *)(void *)(&alpn_buffer[cur]); - cur += sizeof(unsigned int); + cur += (int)sizeof(unsigned int); /* The next four bytes are an indicator that this buffer will contain ALPN data, as opposed to NPN, for example. */ *(unsigned int *)(void *)&alpn_buffer[cur] = SecApplicationProtocolNegotiationExt_ALPN; - cur += sizeof(unsigned int); + cur += (int)sizeof(unsigned int); /* The next two bytes will be an unsigned short indicating the number of bytes used to list the preferred protocols. */ list_len = (unsigned short*)(void *)(&alpn_buffer[cur]); - cur += sizeof(unsigned short); + cur += (int)sizeof(unsigned short); list_start_index = cur; @@ -1225,7 +1225,9 @@ schannel_connect_step1(struct Curl_cfilter *cf, struct Curl_easy *data) cur += proto.len; *list_len = curlx_uitous(cur - list_start_index); - *extension_len = *list_len + sizeof(unsigned int) + sizeof(unsigned short); + *extension_len = *list_len + + (unsigned short)sizeof(unsigned int) + + (unsigned short)sizeof(unsigned short); InitSecBuffer(&inbuf, SECBUFFER_APPLICATION_PROTOCOLS, alpn_buffer, cur); InitSecBufferDesc(&inbuf_desc, &inbuf, 1); |