diff options
author | Andy Polyakov <appro@openssl.org> | 2015-10-05 15:23:37 +0200 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2015-10-06 09:44:27 +0200 |
commit | f4bd5de54459cc5f873807c7ed1f1b04b6e8d7e3 (patch) | |
tree | 901cbbad9556241e0d35dcea1420a68d19901371 /ssl/record | |
parent | 52ee3ed3a11024ab6e11c5705da6c3ba17cf7d98 (diff) |
Address more Windows warnings illuminated by mingw.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'ssl/record')
-rw-r--r-- | ssl/record/rec_layer_s3.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c index 6beb8ce35c..f5dd27aa7c 100644 --- a/ssl/record/rec_layer_s3.c +++ b/ssl/record/rec_layer_s3.c @@ -293,7 +293,7 @@ int ssl3_read_n(SSL *s, int n, int max, int extend) * s->packet_length bytes if extend == 1].) */ int i, len, left; - long align = 0; + size_t align = 0; unsigned char *pkt; SSL3_BUFFER *rb; @@ -307,8 +307,8 @@ int ssl3_read_n(SSL *s, int n, int max, int extend) left = rb->left; #if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD!=0 - align = (long)rb->buf + SSL3_RT_HEADER_LENGTH; - align = (-align) & (SSL3_ALIGN_PAYLOAD - 1); + align = (size_t)rb->buf + SSL3_RT_HEADER_LENGTH; + align = (0-align) & (SSL3_ALIGN_PAYLOAD - 1); #endif if (!extend) { @@ -673,7 +673,7 @@ int do_ssl3_write(SSL *s, int type, const unsigned char *buf, int i, mac_size, clear = 0; int prefix_len = 0; int eivlen; - long align = 0; + size_t align = 0; SSL3_RECORD *wr; SSL3_BUFFER *wb = &s->rlayer.wbuf; SSL_SESSION *sess; @@ -753,8 +753,8 @@ int do_ssl3_write(SSL *s, int type, const unsigned char *buf, * multiple of SSL3_ALIGN_PAYLOAD, so if we want to align the real * payload, then we can just pretent we simply have two headers. */ - align = (long)SSL3_BUFFER_get_buf(wb) + 2 * SSL3_RT_HEADER_LENGTH; - align = (-align) & (SSL3_ALIGN_PAYLOAD - 1); + align = (size_t)SSL3_BUFFER_get_buf(wb) + 2 * SSL3_RT_HEADER_LENGTH; + align = (0-align) & (SSL3_ALIGN_PAYLOAD - 1); #endif p = SSL3_BUFFER_get_buf(wb) + align; SSL3_BUFFER_set_offset(wb, align); @@ -762,8 +762,8 @@ int do_ssl3_write(SSL *s, int type, const unsigned char *buf, p = SSL3_BUFFER_get_buf(wb) + SSL3_BUFFER_get_offset(wb) + prefix_len; } else { #if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD!=0 - align = (long)SSL3_BUFFER_get_buf(wb) + SSL3_RT_HEADER_LENGTH; - align = (-align) & (SSL3_ALIGN_PAYLOAD - 1); + align = (size_t)SSL3_BUFFER_get_buf(wb) + SSL3_RT_HEADER_LENGTH; + align = (0-align) & (SSL3_ALIGN_PAYLOAD - 1); #endif p = SSL3_BUFFER_get_buf(wb) + align; SSL3_BUFFER_set_offset(wb, align); |