Fix some clang warnings.
This commit is contained in:
parent
e54e123549
commit
08e5536445
8 changed files with 68 additions and 67 deletions
|
@ -105,22 +105,23 @@ void md4_block_data_order (MD4_CTX *c, const void *data_, size_t num)
|
|||
|
||||
for (;num--;)
|
||||
{
|
||||
HOST_c2l(data,l); X( 0)=l; HOST_c2l(data,l); X( 1)=l;
|
||||
(void)HOST_c2l(data,l); X( 0)=l;
|
||||
(void)HOST_c2l(data,l); X( 1)=l;
|
||||
/* Round 0 */
|
||||
R0(A,B,C,D,X( 0), 3,0); HOST_c2l(data,l); X( 2)=l;
|
||||
R0(D,A,B,C,X( 1), 7,0); HOST_c2l(data,l); X( 3)=l;
|
||||
R0(C,D,A,B,X( 2),11,0); HOST_c2l(data,l); X( 4)=l;
|
||||
R0(B,C,D,A,X( 3),19,0); HOST_c2l(data,l); X( 5)=l;
|
||||
R0(A,B,C,D,X( 4), 3,0); HOST_c2l(data,l); X( 6)=l;
|
||||
R0(D,A,B,C,X( 5), 7,0); HOST_c2l(data,l); X( 7)=l;
|
||||
R0(C,D,A,B,X( 6),11,0); HOST_c2l(data,l); X( 8)=l;
|
||||
R0(B,C,D,A,X( 7),19,0); HOST_c2l(data,l); X( 9)=l;
|
||||
R0(A,B,C,D,X( 8), 3,0); HOST_c2l(data,l); X(10)=l;
|
||||
R0(D,A,B,C,X( 9), 7,0); HOST_c2l(data,l); X(11)=l;
|
||||
R0(C,D,A,B,X(10),11,0); HOST_c2l(data,l); X(12)=l;
|
||||
R0(B,C,D,A,X(11),19,0); HOST_c2l(data,l); X(13)=l;
|
||||
R0(A,B,C,D,X(12), 3,0); HOST_c2l(data,l); X(14)=l;
|
||||
R0(D,A,B,C,X(13), 7,0); HOST_c2l(data,l); X(15)=l;
|
||||
R0(A,B,C,D,X( 0), 3,0); (void)HOST_c2l(data,l); X( 2)=l;
|
||||
R0(D,A,B,C,X( 1), 7,0); (void)HOST_c2l(data,l); X( 3)=l;
|
||||
R0(C,D,A,B,X( 2),11,0); (void)HOST_c2l(data,l); X( 4)=l;
|
||||
R0(B,C,D,A,X( 3),19,0); (void)HOST_c2l(data,l); X( 5)=l;
|
||||
R0(A,B,C,D,X( 4), 3,0); (void)HOST_c2l(data,l); X( 6)=l;
|
||||
R0(D,A,B,C,X( 5), 7,0); (void)HOST_c2l(data,l); X( 7)=l;
|
||||
R0(C,D,A,B,X( 6),11,0); (void)HOST_c2l(data,l); X( 8)=l;
|
||||
R0(B,C,D,A,X( 7),19,0); (void)HOST_c2l(data,l); X( 9)=l;
|
||||
R0(A,B,C,D,X( 8), 3,0); (void)HOST_c2l(data,l); X(10)=l;
|
||||
R0(D,A,B,C,X( 9), 7,0); (void)HOST_c2l(data,l); X(11)=l;
|
||||
R0(C,D,A,B,X(10),11,0); (void)HOST_c2l(data,l); X(12)=l;
|
||||
R0(B,C,D,A,X(11),19,0); (void)HOST_c2l(data,l); X(13)=l;
|
||||
R0(A,B,C,D,X(12), 3,0); (void)HOST_c2l(data,l); X(14)=l;
|
||||
R0(D,A,B,C,X(13), 7,0); (void)HOST_c2l(data,l); X(15)=l;
|
||||
R0(C,D,A,B,X(14),11,0);
|
||||
R0(B,C,D,A,X(15),19,0);
|
||||
/* Round 1 */
|
||||
|
|
|
@ -77,10 +77,10 @@ void md4_block_data_order (MD4_CTX *c, const void *p,size_t num);
|
|||
#define HASH_FINAL MD4_Final
|
||||
#define HASH_MAKE_STRING(c,s) do { \
|
||||
unsigned long ll; \
|
||||
ll=(c)->A; HOST_l2c(ll,(s)); \
|
||||
ll=(c)->B; HOST_l2c(ll,(s)); \
|
||||
ll=(c)->C; HOST_l2c(ll,(s)); \
|
||||
ll=(c)->D; HOST_l2c(ll,(s)); \
|
||||
ll=(c)->A; (void)HOST_l2c(ll,(s)); \
|
||||
ll=(c)->B; (void)HOST_l2c(ll,(s)); \
|
||||
ll=(c)->C; (void)HOST_l2c(ll,(s)); \
|
||||
ll=(c)->D; (void)HOST_l2c(ll,(s)); \
|
||||
} while (0)
|
||||
#define HASH_BLOCK_DATA_ORDER md4_block_data_order
|
||||
|
||||
|
|
|
@ -88,10 +88,10 @@ void md5_block_data_order (MD5_CTX *c, const void *p,size_t num);
|
|||
#define HASH_FINAL MD5_Final
|
||||
#define HASH_MAKE_STRING(c,s) do { \
|
||||
unsigned long ll; \
|
||||
ll=(c)->A; HOST_l2c(ll,(s)); \
|
||||
ll=(c)->B; HOST_l2c(ll,(s)); \
|
||||
ll=(c)->C; HOST_l2c(ll,(s)); \
|
||||
ll=(c)->D; HOST_l2c(ll,(s)); \
|
||||
ll=(c)->A; (void)HOST_l2c(ll,(s)); \
|
||||
ll=(c)->B; (void)HOST_l2c(ll,(s)); \
|
||||
ll=(c)->C; (void)HOST_l2c(ll,(s)); \
|
||||
ll=(c)->D; (void)HOST_l2c(ll,(s)); \
|
||||
} while (0)
|
||||
#define HASH_BLOCK_DATA_ORDER md5_block_data_order
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *),
|
|||
name_funcs_stack=sk_NAME_FUNCS_new_null();
|
||||
MemCheck_on();
|
||||
}
|
||||
if ((name_funcs_stack == NULL))
|
||||
if (name_funcs_stack == NULL)
|
||||
{
|
||||
/* ERROR */
|
||||
return(0);
|
||||
|
|
|
@ -104,21 +104,21 @@ void ripemd160_block_data_order (RIPEMD160_CTX *ctx, const void *p, size_t num)
|
|||
|
||||
A=ctx->A; B=ctx->B; C=ctx->C; D=ctx->D; E=ctx->E;
|
||||
|
||||
HOST_c2l(data,l); X( 0)=l; HOST_c2l(data,l); X( 1)=l;
|
||||
RIP1(A,B,C,D,E,WL00,SL00); HOST_c2l(data,l); X( 2)=l;
|
||||
RIP1(E,A,B,C,D,WL01,SL01); HOST_c2l(data,l); X( 3)=l;
|
||||
RIP1(D,E,A,B,C,WL02,SL02); HOST_c2l(data,l); X( 4)=l;
|
||||
RIP1(C,D,E,A,B,WL03,SL03); HOST_c2l(data,l); X( 5)=l;
|
||||
RIP1(B,C,D,E,A,WL04,SL04); HOST_c2l(data,l); X( 6)=l;
|
||||
RIP1(A,B,C,D,E,WL05,SL05); HOST_c2l(data,l); X( 7)=l;
|
||||
RIP1(E,A,B,C,D,WL06,SL06); HOST_c2l(data,l); X( 8)=l;
|
||||
RIP1(D,E,A,B,C,WL07,SL07); HOST_c2l(data,l); X( 9)=l;
|
||||
RIP1(C,D,E,A,B,WL08,SL08); HOST_c2l(data,l); X(10)=l;
|
||||
RIP1(B,C,D,E,A,WL09,SL09); HOST_c2l(data,l); X(11)=l;
|
||||
RIP1(A,B,C,D,E,WL10,SL10); HOST_c2l(data,l); X(12)=l;
|
||||
RIP1(E,A,B,C,D,WL11,SL11); HOST_c2l(data,l); X(13)=l;
|
||||
RIP1(D,E,A,B,C,WL12,SL12); HOST_c2l(data,l); X(14)=l;
|
||||
RIP1(C,D,E,A,B,WL13,SL13); HOST_c2l(data,l); X(15)=l;
|
||||
(void)HOST_c2l(data,l); X( 0)=l;(void)HOST_c2l(data,l); X( 1)=l;
|
||||
RIP1(A,B,C,D,E,WL00,SL00); (void)HOST_c2l(data,l); X( 2)=l;
|
||||
RIP1(E,A,B,C,D,WL01,SL01); (void)HOST_c2l(data,l); X( 3)=l;
|
||||
RIP1(D,E,A,B,C,WL02,SL02); (void)HOST_c2l(data,l); X( 4)=l;
|
||||
RIP1(C,D,E,A,B,WL03,SL03); (void)HOST_c2l(data,l); X( 5)=l;
|
||||
RIP1(B,C,D,E,A,WL04,SL04); (void)HOST_c2l(data,l); X( 6)=l;
|
||||
RIP1(A,B,C,D,E,WL05,SL05); (void)HOST_c2l(data,l); X( 7)=l;
|
||||
RIP1(E,A,B,C,D,WL06,SL06); (void)HOST_c2l(data,l); X( 8)=l;
|
||||
RIP1(D,E,A,B,C,WL07,SL07); (void)HOST_c2l(data,l); X( 9)=l;
|
||||
RIP1(C,D,E,A,B,WL08,SL08); (void)HOST_c2l(data,l); X(10)=l;
|
||||
RIP1(B,C,D,E,A,WL09,SL09); (void)HOST_c2l(data,l); X(11)=l;
|
||||
RIP1(A,B,C,D,E,WL10,SL10); (void)HOST_c2l(data,l); X(12)=l;
|
||||
RIP1(E,A,B,C,D,WL11,SL11); (void)HOST_c2l(data,l); X(13)=l;
|
||||
RIP1(D,E,A,B,C,WL12,SL12); (void)HOST_c2l(data,l); X(14)=l;
|
||||
RIP1(C,D,E,A,B,WL13,SL13); (void)HOST_c2l(data,l); X(15)=l;
|
||||
RIP1(B,C,D,E,A,WL14,SL14);
|
||||
RIP1(A,B,C,D,E,WL15,SL15);
|
||||
|
||||
|
|
|
@ -88,11 +88,11 @@ void ripemd160_block_data_order (RIPEMD160_CTX *c, const void *p,size_t num);
|
|||
#define HASH_FINAL RIPEMD160_Final
|
||||
#define HASH_MAKE_STRING(c,s) do { \
|
||||
unsigned long ll; \
|
||||
ll=(c)->A; HOST_l2c(ll,(s)); \
|
||||
ll=(c)->B; HOST_l2c(ll,(s)); \
|
||||
ll=(c)->C; HOST_l2c(ll,(s)); \
|
||||
ll=(c)->D; HOST_l2c(ll,(s)); \
|
||||
ll=(c)->E; HOST_l2c(ll,(s)); \
|
||||
ll=(c)->A; (void)HOST_l2c(ll,(s)); \
|
||||
ll=(c)->B; (void)HOST_l2c(ll,(s)); \
|
||||
ll=(c)->C; (void)HOST_l2c(ll,(s)); \
|
||||
ll=(c)->D; (void)HOST_l2c(ll,(s)); \
|
||||
ll=(c)->E; (void)HOST_l2c(ll,(s)); \
|
||||
} while (0)
|
||||
#define HASH_BLOCK_DATA_ORDER ripemd160_block_data_order
|
||||
|
||||
|
|
|
@ -89,17 +89,17 @@ int SHA224_Final (unsigned char *md, SHA256_CTX *c)
|
|||
switch ((c)->md_len) \
|
||||
{ case SHA224_DIGEST_LENGTH: \
|
||||
for (nn=0;nn<SHA224_DIGEST_LENGTH/4;nn++) \
|
||||
{ ll=(c)->h[nn]; HOST_l2c(ll,(s)); } \
|
||||
{ ll=(c)->h[nn]; (void)HOST_l2c(ll,(s)); } \
|
||||
break; \
|
||||
case SHA256_DIGEST_LENGTH: \
|
||||
for (nn=0;nn<SHA256_DIGEST_LENGTH/4;nn++) \
|
||||
{ ll=(c)->h[nn]; HOST_l2c(ll,(s)); } \
|
||||
{ ll=(c)->h[nn]; (void)HOST_l2c(ll,(s)); } \
|
||||
break; \
|
||||
default: \
|
||||
if ((c)->md_len > SHA256_DIGEST_LENGTH) \
|
||||
return 0; \
|
||||
for (nn=0;nn<(c)->md_len/4;nn++) \
|
||||
{ ll=(c)->h[nn]; HOST_l2c(ll,(s)); } \
|
||||
{ ll=(c)->h[nn]; (void)HOST_l2c(ll,(s)); } \
|
||||
break; \
|
||||
} \
|
||||
} while (0)
|
||||
|
|
|
@ -69,11 +69,11 @@
|
|||
#define HASH_CBLOCK SHA_CBLOCK
|
||||
#define HASH_MAKE_STRING(c,s) do { \
|
||||
unsigned long ll; \
|
||||
ll=(c)->h0; HOST_l2c(ll,(s)); \
|
||||
ll=(c)->h1; HOST_l2c(ll,(s)); \
|
||||
ll=(c)->h2; HOST_l2c(ll,(s)); \
|
||||
ll=(c)->h3; HOST_l2c(ll,(s)); \
|
||||
ll=(c)->h4; HOST_l2c(ll,(s)); \
|
||||
ll=(c)->h0; (void)HOST_l2c(ll,(s)); \
|
||||
ll=(c)->h1; (void)HOST_l2c(ll,(s)); \
|
||||
ll=(c)->h2; (void)HOST_l2c(ll,(s)); \
|
||||
ll=(c)->h3; (void)HOST_l2c(ll,(s)); \
|
||||
ll=(c)->h4; (void)HOST_l2c(ll,(s)); \
|
||||
} while (0)
|
||||
|
||||
#if defined(SHA_0)
|
||||
|
@ -252,21 +252,21 @@ static void HASH_BLOCK_DATA_ORDER (SHA_CTX *c, const void *p, size_t num)
|
|||
}
|
||||
else
|
||||
{
|
||||
HOST_c2l(data,l); X( 0)=l; HOST_c2l(data,l); X( 1)=l;
|
||||
BODY_00_15( 0,A,B,C,D,E,T,X( 0)); HOST_c2l(data,l); X( 2)=l;
|
||||
BODY_00_15( 1,T,A,B,C,D,E,X( 1)); HOST_c2l(data,l); X( 3)=l;
|
||||
BODY_00_15( 2,E,T,A,B,C,D,X( 2)); HOST_c2l(data,l); X( 4)=l;
|
||||
BODY_00_15( 3,D,E,T,A,B,C,X( 3)); HOST_c2l(data,l); X( 5)=l;
|
||||
BODY_00_15( 4,C,D,E,T,A,B,X( 4)); HOST_c2l(data,l); X( 6)=l;
|
||||
BODY_00_15( 5,B,C,D,E,T,A,X( 5)); HOST_c2l(data,l); X( 7)=l;
|
||||
BODY_00_15( 6,A,B,C,D,E,T,X( 6)); HOST_c2l(data,l); X( 8)=l;
|
||||
BODY_00_15( 7,T,A,B,C,D,E,X( 7)); HOST_c2l(data,l); X( 9)=l;
|
||||
BODY_00_15( 8,E,T,A,B,C,D,X( 8)); HOST_c2l(data,l); X(10)=l;
|
||||
BODY_00_15( 9,D,E,T,A,B,C,X( 9)); HOST_c2l(data,l); X(11)=l;
|
||||
BODY_00_15(10,C,D,E,T,A,B,X(10)); HOST_c2l(data,l); X(12)=l;
|
||||
BODY_00_15(11,B,C,D,E,T,A,X(11)); HOST_c2l(data,l); X(13)=l;
|
||||
BODY_00_15(12,A,B,C,D,E,T,X(12)); HOST_c2l(data,l); X(14)=l;
|
||||
BODY_00_15(13,T,A,B,C,D,E,X(13)); HOST_c2l(data,l); X(15)=l;
|
||||
(void)HOST_c2l(data,l); X( 0)=l; (void)HOST_c2l(data,l); X( 1)=l;
|
||||
BODY_00_15( 0,A,B,C,D,E,T,X( 0)); (void)HOST_c2l(data,l); X( 2)=l;
|
||||
BODY_00_15( 1,T,A,B,C,D,E,X( 1)); (void)HOST_c2l(data,l); X( 3)=l;
|
||||
BODY_00_15( 2,E,T,A,B,C,D,X( 2)); (void)HOST_c2l(data,l); X( 4)=l;
|
||||
BODY_00_15( 3,D,E,T,A,B,C,X( 3)); (void)HOST_c2l(data,l); X( 5)=l;
|
||||
BODY_00_15( 4,C,D,E,T,A,B,X( 4)); (void)HOST_c2l(data,l); X( 6)=l;
|
||||
BODY_00_15( 5,B,C,D,E,T,A,X( 5)); (void)HOST_c2l(data,l); X( 7)=l;
|
||||
BODY_00_15( 6,A,B,C,D,E,T,X( 6)); (void)HOST_c2l(data,l); X( 8)=l;
|
||||
BODY_00_15( 7,T,A,B,C,D,E,X( 7)); (void)HOST_c2l(data,l); X( 9)=l;
|
||||
BODY_00_15( 8,E,T,A,B,C,D,X( 8)); (void)HOST_c2l(data,l); X(10)=l;
|
||||
BODY_00_15( 9,D,E,T,A,B,C,X( 9)); (void)HOST_c2l(data,l); X(11)=l;
|
||||
BODY_00_15(10,C,D,E,T,A,B,X(10)); (void)HOST_c2l(data,l); X(12)=l;
|
||||
BODY_00_15(11,B,C,D,E,T,A,X(11)); (void)HOST_c2l(data,l); X(13)=l;
|
||||
BODY_00_15(12,A,B,C,D,E,T,X(12)); (void)HOST_c2l(data,l); X(14)=l;
|
||||
BODY_00_15(13,T,A,B,C,D,E,X(13)); (void)HOST_c2l(data,l); X(15)=l;
|
||||
BODY_00_15(14,E,T,A,B,C,D,X(14));
|
||||
BODY_00_15(15,D,E,T,A,B,C,X(15));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue