windows compiler warnings

This commit is contained in:
Jeff Lenk
2013-04-01 17:09:37 -05:00
parent 511b2fc49a
commit d627f7c23d
10 changed files with 29 additions and 14 deletions

View File

@@ -49,6 +49,9 @@
#include "aes_icm.h"
#include "alloc.h"
#ifdef _MSC_VER
#pragma warning(disable:4100)
#endif
debug_module_t mod_aes_icm = {
0, /* debugging is off by default */
@@ -378,7 +381,7 @@ aes_icm_encrypt_ismacryp(aes_icm_ctx_t *c,
for (i=0; i < (bytes_to_encr/sizeof(v128_t)); i++) {
/* fill buffer with new keystream */
aes_icm_advance_ismacryp(c, forIsmacryp);
aes_icm_advance_ismacryp(c, (uint8_t)forIsmacryp);
/*
* add keystream into the data buffer (this would be a lot faster
@@ -426,7 +429,7 @@ aes_icm_encrypt_ismacryp(aes_icm_ctx_t *c,
if ((bytes_to_encr & 0xf) != 0) {
/* fill buffer with new keystream */
aes_icm_advance_ismacryp(c, forIsmacryp);
aes_icm_advance_ismacryp(c, (uint8_t)forIsmacryp);
for (i=0; i < (bytes_to_encr & 0xf); i++)
*buf++ ^= c->keystream_buffer.v8[i];

View File

@@ -155,7 +155,7 @@ cipher_type_test(const cipher_type_t *ct, const cipher_test_case_t *test_data) {
test_case->ciphertext_length_octets));
/* compare the resulting ciphertext with that in the test case */
if (len != test_case->ciphertext_length_octets)
if (len != (unsigned int)test_case->ciphertext_length_octets)
return err_status_algo_fail;
status = err_status_ok;
for (i=0; i < test_case->ciphertext_length_octets; i++)
@@ -222,7 +222,7 @@ cipher_type_test(const cipher_type_t *ct, const cipher_test_case_t *test_data) {
test_case->plaintext_length_octets));
/* compare the resulting plaintext with that in the test case */
if (len != test_case->plaintext_length_octets)
if (len != (unsigned int)test_case->plaintext_length_octets)
return err_status_algo_fail;
status = err_status_ok;
for (i=0; i < test_case->plaintext_length_octets; i++)
@@ -344,7 +344,7 @@ cipher_type_test(const cipher_type_t *ct, const cipher_test_case_t *test_data) {
octet_string_hex_string(buffer, length));
/* compare the resulting plaintext with the original one */
if (length != plaintext_len)
if (length != (unsigned int)plaintext_len)
return err_status_algo_fail;
status = err_status_ok;
for (i=0; i < plaintext_len; i++)

View File

@@ -48,6 +48,10 @@
#include "null_cipher.h"
#include "alloc.h"
#ifdef _MSC_VER
#pragma warning(disable:4100)
#endif
/* the null_cipher uses the cipher debug module */
extern debug_module_t mod_cipher;