Skip to content

Commit

Permalink
Analyzer fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
douzzer authored and julek-wolfssl committed Aug 16, 2024
1 parent a6a40de commit b693127
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/ssl_asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ static void asn1_free_tpl(void *obj, const WOLFSSL_ASN1_TEMPLATE *mem)
{
if (obj != NULL) {
if (mem->sequence)
wolfSSL_sk_pop_free(obj, mem->free_func);
wolfSSL_sk_pop_free((WOLFSSL_STACK *)obj, mem->free_func);
else
mem->free_func(obj);
}
Expand Down Expand Up @@ -201,9 +201,9 @@ static int i2d_asn1_items(const void* obj, byte** buf,
const WOLFSSL_ASN1_TEMPLATE* mem)
{
int len = 0;
int ret;
int ret = 0;
if (mem->sequence) {
const WOLFSSL_STACK* sk = asn1Mem(obj, mem->offset);
const WOLFSSL_STACK* sk = (WOLFSSL_STACK *)asn1Mem(obj, mem->offset);
int ski; /* stack index */
int innerLen = 0;
/* Figure out the inner length first */
Expand Down
2 changes: 1 addition & 1 deletion src/x509.c
Original file line number Diff line number Diff line change
Expand Up @@ -13350,7 +13350,7 @@ WOLFSSL_X509_OBJECT *wolfSSL_X509_OBJECT_retrieve_by_subject(
return NULL;

for (i = 0; i < wolfSSL_sk_X509_OBJECT_num(sk); i++) {
WOLFSSL_X509_OBJECT* obj = wolfSSL_sk_X509_OBJECT_value(sk, i);
WOLFSSL_X509_OBJECT* obj = (WOLFSSL_X509_OBJECT *)wolfSSL_sk_X509_OBJECT_value(sk, i);
if (obj != NULL && obj->type == type &&
wolfSSL_X509_NAME_cmp(
wolfSSL_X509_get_subject_name(obj->data.x509), name) == 0)
Expand Down
2 changes: 1 addition & 1 deletion wolfssl/openssl/asn1.h
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ WOLFSSL_API void* wolfSSL_ASN1_item_d2i(void** dst, const byte **src, long len,
type* d2i_##type(type **dst, const byte **src, long len); \
type* d2i_##type(type **dst, const byte **src, long len) \
{ \
return wolfSSL_ASN1_item_d2i((void**)dst, src, len, \
return (type*)wolfSSL_ASN1_item_d2i((void**)dst, src, len, \
&type##_template_data); \
}
/* // NOLINTEND(readability-named-parameter) */
Expand Down

0 comments on commit b693127

Please sign in to comment.