diff options
author | Andy Polyakov <appro@openssl.org> | 2017-11-11 22:23:12 +0100 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2017-11-13 10:58:57 +0100 |
commit | 3a63c0edab842af3e84ef1cad2b4eb701eece3e1 (patch) | |
tree | c45bf7fb2f69874b2779b33e5597a59bbc92e648 /ssl | |
parent | 802127e8fc07cbef499b645e7e1ae48ce3ed981c (diff) |
Resolve warnings in VC-WIN32 build, which allows to add /WX.
It's argued that /WX allows to keep better focus on new code, which
motivates its comeback...
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4721)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/record/rec_layer_s3.c | 2 | ||||
-rw-r--r-- | ssl/statem/extensions_clnt.c | 2 | ||||
-rw-r--r-- | ssl/statem/statem_lib.c | 2 | ||||
-rw-r--r-- | ssl/t1_lib.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c index c1101a6735..317719b63e 100644 --- a/ssl/record/rec_layer_s3.c +++ b/ssl/record/rec_layer_s3.c @@ -1417,7 +1417,7 @@ int ssl3_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf, memcpy(dest + *dest_len, SSL3_RECORD_get_data(rr) + SSL3_RECORD_get_off(rr), n); SSL3_RECORD_add_off(rr, n); - SSL3_RECORD_add_length(rr, -n); + SSL3_RECORD_sub_length(rr, n); *dest_len += n; if (SSL3_RECORD_get_length(rr) == 0) SSL3_RECORD_set_read(rr); diff --git a/ssl/statem/extensions_clnt.c b/ssl/statem/extensions_clnt.c index ff2e0cf575..a690751222 100644 --- a/ssl/statem/extensions_clnt.c +++ b/ssl/statem/extensions_clnt.c @@ -1316,7 +1316,7 @@ int tls_parse_stoc_sct(SSL *s, PACKET *pkt, unsigned int context, X509 *x, OPENSSL_free(s->ext.scts); s->ext.scts = NULL; - s->ext.scts_len = size; + s->ext.scts_len = (uint16_t)size; if (size > 0) { s->ext.scts = OPENSSL_malloc(size); if (s->ext.scts == NULL diff --git a/ssl/statem/statem_lib.c b/ssl/statem/statem_lib.c index 6db881630e..cb1fb7d3dc 100644 --- a/ssl/statem/statem_lib.c +++ b/ssl/statem/statem_lib.c @@ -2020,7 +2020,7 @@ int create_synthetic_message_hash(SSL *s) /* Inject the synthetic message_hash message */ msghdr[0] = SSL3_MT_MESSAGE_HASH; - msghdr[SSL3_HM_HEADER_LENGTH - 1] = hashlen; + msghdr[SSL3_HM_HEADER_LENGTH - 1] = (unsigned char)hashlen; if (!ssl3_finish_mac(s, msghdr, SSL3_HM_HEADER_LENGTH) || !ssl3_finish_mac(s, hashval, hashlen)) { SSLerr(SSL_F_CREATE_SYNTHETIC_MESSAGE_HASH, ERR_R_INTERNAL_ERROR); diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 48f01ffe9d..c1db7dfee5 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -199,7 +199,7 @@ static uint16_t tls1_nid2group_id(int nid) size_t i; for (i = 0; i < OSSL_NELEM(nid_list); i++) { if (nid_list[i].nid == nid) - return i + 1; + return (uint16_t)(i + 1); } return 0; } |