fix all clang warnings except Wpadded (diagnostic), Wconversion which inludes Wsign-conversion (implicit conversions part of standard)

This commit is contained in:
toddouska
2014-03-03 13:27:52 -08:00
parent c39cdbea54
commit 1fd6245600
6 changed files with 6 additions and 8 deletions

View File

@ -956,7 +956,7 @@ void bench_eccKeyAgree(void)
byte shared[1024];
byte sig[1024];
byte digest[32];
word32 x;
word32 x = 0;
ecc_init(&genKey);
ecc_init(&genKey2);

View File

@ -971,7 +971,8 @@ static int ecc_mulmod(mp_int* k, ecc_point *G, ecc_point *R, mp_int* modulus,
mp_int mu;
mp_digit mp;
unsigned long buf;
int first, bitbuf, bitcpy, bitcnt, mode, digidx;
int first = 1, bitbuf = 0, bitcpy = 0, bitcnt = 0, mode = 0,
digidx = 0;
if (k == NULL || G == NULL || R == NULL || modulus == NULL)
return ECC_BAD_ARG_E;

View File

@ -2402,7 +2402,7 @@ int mp_add_d(fp_int *a, fp_digit b, fp_int *c)
#ifdef HAVE_ECC
/* chars used in radix conversions */
const char *fp_s_rmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/";
static const char *fp_s_rmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/";
static int fp_read_radix(fp_int *a, const char *str, int radix)
{

View File

@ -2817,7 +2817,7 @@ static int GetRecordHeader(CYASSL* ssl, const byte* input, word32* inOutIdx,
#endif
/* verify record type here as well */
switch ((enum ContentType)rh->type) {
switch (rh->type) {
case handshake:
case change_cipher_spec:
case application_data:

View File

@ -94,13 +94,10 @@ static int xstat2err(int stat)
switch (stat) {
case CERT_GOOD:
return 0;
break;
case CERT_REVOKED:
return OCSP_CERT_REVOKED;
break;
default:
return OCSP_CERT_UNKNOWN;
break;
}
}

View File

@ -948,7 +948,7 @@ static int test_CyaSSL_read_write(void)
FreeTcpReady(&ready);
return test_result;
};
}
#endif