#include "vtls/vtls.h"
#include "curl_ngtcp2.h"
+#include "warnless.h"
+
/* The last 3 #include files should be in this order */
#include "curl_printf.h"
#include "curl_memory.h"
ssize_t recvd;
int rv;
uint8_t buf[65536];
- size_t bufsize = sizeof(buf);
+ int bufsize = (int)sizeof(buf);
size_t pktcount = 0, total_recvd = 0;
struct sockaddr_storage remote_addr;
socklen_t remote_addrlen;
(uint8_t *)buffer, sizeof(buffer),
&ctx->last_error, ts);
if(rc > 0) {
- while((send(ctx->q.sockfd, buffer, rc, 0) == -1) &&
+ while((send(ctx->q.sockfd, buffer, (SEND_TYPE_ARG3)rc, 0) == -1) &&
SOCKERRNO == EINTR);
}
}
cf->ctx = NULL;
/* No CF_DATA_RESTORE(cf, save) possible */
+ (void)save;
}
/*
struct cf_quiche_ctx *ctx = cf->ctx;
int64_t stream3_id = data->req.p.http? data->req.p.http->stream3_id : -1;
uint8_t buf[65536];
- size_t bufsize = sizeof(buf);
+ int bufsize = (int)sizeof(buf);
struct sockaddr_storage remote_addr;
socklen_t remote_addrlen;
quiche_recv_info recv_info;
*psent = 0;
- while((sent = send(qctx->sockfd, (const char *)pkt, pktlen, 0)) == -1 &&
+ while((sent = send(qctx->sockfd,
+ (const char *)pkt, (SEND_TYPE_ARG3)pktlen, 0)) == -1 &&
SOCKERRNO == EINTR)
;
/* 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;
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);