Fix signed/unsigned comparisons.
[openssl.git] / crypto / evp / e_aes_cbc_hmac_sha256.c
index 63c6acda974f1d523a67f9d104912bec9c4c9192..31db13ef8d5cb1166b3b8e036aca247aa749daf6 100644 (file)
@@ -206,8 +206,6 @@ static size_t tls1_1_multi_block_encrypt(EVP_AES_HMAC_SHA256 *key,
        u8              *IVs;
 #if defined(BSWAP8)
        u64             seqnum;
-#else
-       unsigned int    carry,j;
 #endif
 
        if (RAND_bytes((IVs=blocks[0].c),16*x4)<=0)     /* ask for IVs in bulk */
@@ -244,6 +242,9 @@ static size_t tls1_1_multi_block_encrypt(EVP_AES_HMAC_SHA256 *key,
 #endif
        for (i=0;i<x4;i++) {
                unsigned int len = (i==(x4-1)?last:frag);
+#if !defined(BSWAP8)
+               unsigned int carry, j;
+#endif
 
                ctx->A[i] = key->md.h[0];
                ctx->B[i] = key->md.h[1];
@@ -773,7 +774,7 @@ static int aesni_cbc_hmac_sha256_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, vo
                unsigned int n4x=1, x4;
                unsigned int frag, last, packlen, inp_len;
 
-               if (arg<sizeof(EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM)) return -1;
+               if (arg<(int)sizeof(EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM)) return -1;
 
                inp_len = param->inp[11]<<8|param->inp[12];