mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 04:04:39 +02:00
Fix cast warnings with g++.
This commit is contained in:
@@ -1481,7 +1481,8 @@ WOLFSSL_OCSP_CERTID* wolfSSL_d2i_OCSP_CERTID(WOLFSSL_OCSP_CERTID** cidOut,
|
|||||||
}
|
}
|
||||||
|
|
||||||
XMEMSET(cid, 0, sizeof(WOLFSSL_OCSP_CERTID));
|
XMEMSET(cid, 0, sizeof(WOLFSSL_OCSP_CERTID));
|
||||||
cid->status = XMALLOC(sizeof(CertStatus), NULL, DYNAMIC_TYPE_OCSP_STATUS);
|
cid->status = (CertStatus*)XMALLOC(sizeof(CertStatus), NULL,
|
||||||
|
DYNAMIC_TYPE_OCSP_STATUS);
|
||||||
if (cid->status == NULL) {
|
if (cid->status == NULL) {
|
||||||
XFREE(cid, NULL, DYNAMIC_TYPE_OPENSSL);
|
XFREE(cid, NULL, DYNAMIC_TYPE_OPENSSL);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@@ -623,7 +623,7 @@ int test_ocsp_certid_enc_dec(void)
|
|||||||
ExpectIntGT(derSz1 = wolfSSL_i2d_OCSP_CERTID(certId, &der), 0);
|
ExpectIntGT(derSz1 = wolfSSL_i2d_OCSP_CERTID(certId, &der), 0);
|
||||||
ExpectIntEQ(derSz, derSz1);
|
ExpectIntEQ(derSz, derSz1);
|
||||||
|
|
||||||
temp = der2 = XMALLOC(derSz, NULL, DYNAMIC_TYPE_OPENSSL);
|
temp = der2 = (unsigned char*)XMALLOC(derSz, NULL, DYNAMIC_TYPE_OPENSSL);
|
||||||
ExpectNotNull(der2);
|
ExpectNotNull(der2);
|
||||||
/* encode without allocation */
|
/* encode without allocation */
|
||||||
ExpectIntGT(derSz1 = wolfSSL_i2d_OCSP_CERTID(certId, &der2), 0);
|
ExpectIntGT(derSz1 = wolfSSL_i2d_OCSP_CERTID(certId, &der2), 0);
|
||||||
|
Reference in New Issue
Block a user