diff --git a/lib/roles/h2/http2.c b/lib/roles/h2/http2.c index 76449b2ae..08594326a 100644 --- a/lib/roles/h2/http2.c +++ b/lib/roles/h2/http2.c @@ -2267,7 +2267,7 @@ lws_h2_ws_handshake(struct lws *wsi) if (lws_add_http_header_by_token(wsi, WSI_TOKEN_PROTOCOL, (uint8_t *)lws_hdr_simple_ptr(wsi, WSI_TOKEN_PROTOCOL), - strlen(lws_hdr_simple_ptr(wsi, + (int)strlen(lws_hdr_simple_ptr(wsi, WSI_TOKEN_PROTOCOL)), &p, end)) return -1; diff --git a/lib/roles/http/server/server.c b/lib/roles/http/server/server.c index 70a8ce0fc..90a05f9c8 100644 --- a/lib/roles/http/server/server.c +++ b/lib/roles/http/server/server.c @@ -695,10 +695,10 @@ lws_http_serve(struct lws *wsi, char *uri, const char *origin, if (!wsi->http2_substream) wsi->sending_chunked = 1; - wsi->protocol_interpret_idx = + wsi->protocol_interpret_idx = (char)( lws_vhost_name_to_protocol(wsi->vhost, pvo->value) - - &lws_get_vhost(wsi)->protocols[0]; + &lws_get_vhost(wsi)->protocols[0]); lwsl_debug("want %s interpreted by %s (pcol is %s)\n", path, wsi->vhost->protocols[ diff --git a/lib/tls/openssl/x509.c b/lib/tls/openssl/x509.c index d441001e3..64ac64ad3 100644 --- a/lib/tls/openssl/x509.c +++ b/lib/tls/openssl/x509.c @@ -239,7 +239,7 @@ lws_x509_parse_from_pem(struct lws_x509_cert *x509, const void *pem, size_t len) { BIO* bio = BIO_new(BIO_s_mem()); - BIO_write(bio, pem, len); + BIO_write(bio, pem, (int)len); x509->cert = PEM_read_bio_X509(bio, NULL, NULL, NULL); BIO_free(bio); if (!x509->cert) { @@ -493,7 +493,7 @@ lws_x509_jwk_privkey_pem(struct lws_jwk *jwk, void *pem, size_t len, const BIGNUM *cmpi; int n, m, ret = -1; - BIO_write(bio, pem, len); + BIO_write(bio, pem, (int)len); PEM_read_bio_PrivateKey(bio, &pkey, lws_x509_jwk_privkey_pem_pp_cb, (void *)passphrase); BIO_free(bio);