Commit 3a63c0ed authored by Andy Polyakov's avatar Andy Polyakov
Browse files

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: default avatarRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4721)
parent 802127e8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1926,7 +1926,7 @@ unsigned char *next_protos_parse(size_t *outlen, const char *in)
                OPENSSL_free(out);
                return NULL;
            }
            out[start] = i - start;
            out[start] = (unsigned char)(i - start);
            start = i + 1;
        } else {
            out[i + 1] = in[i];
+5 −4
Original line number Diff line number Diff line
@@ -417,10 +417,11 @@ static int serverinfo_cli_parse_cb(SSL *s, unsigned int ext_type,
    unsigned char ext_buf[4 + 65536];

    /* Reconstruct the type/len fields prior to extension data */
    ext_buf[0] = ext_type >> 8;
    ext_buf[1] = ext_type & 0xFF;
    ext_buf[2] = inlen >> 8;
    ext_buf[3] = inlen & 0xFF;
    inlen &= 0xffff; /* for formal memcmpy correctness */
    ext_buf[0] = (unsigned char)(ext_type >> 8);
    ext_buf[1] = (unsigned char)(ext_type);
    ext_buf[2] = (unsigned char)(inlen >> 8);
    ext_buf[3] = (unsigned char)(inlen);
    memcpy(ext_buf + 4, in, inlen);

    BIO_snprintf(pem_name, sizeof(pem_name), "SERVERINFO FOR EXTENSION %d",
+2 −2
Original line number Diff line number Diff line
@@ -3198,8 +3198,8 @@ static void multiblock_speed(const EVP_CIPHER *evp_cipher)

                RAND_bytes(out, 16);
                len += 16;
                aad[11] = len >> 8;
                aad[12] = len;
                aad[11] = (unsigned char)(len >> 8);
                aad[12] = (unsigned char)(len);
                pad = EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_TLS1_AAD,
                                          EVP_AEAD_TLS1_AAD_LEN, aad);
                EVP_Cipher(ctx, out, inp, len + pad);
+1 −1
Original line number Diff line number Diff line
@@ -821,7 +821,7 @@ int BIO_lookup_ex(const char *host, const char *service, int lookup_type,

            if (endp != service && *endp == '\0'
                    && portnum > 0 && portnum < 65536) {
                se_fallback.s_port = htons(portnum);
                se_fallback.s_port = htons((unsigned short)portnum);
                se_fallback.s_proto = proto;
                se = &se_fallback;
            } else if (endp == service) {
+1 −1
Original line number Diff line number Diff line
@@ -9,9 +9,9 @@

#include <stdio.h>
#include <string.h>
#include "internal/cryptlib.h"
#include "internal/ctype.h"
#include "internal/numbers.h"
#include "internal/cryptlib.h"
#include <openssl/bio.h>

/*
Loading