Conversion between void * and function pointer.
Value computed not used.
Signed/unsigned argument.
return(NULL);
for (f=functions; f->name != NULL; f++)
- lh_FUNCTION_insert(ret,f);
+ (void)lh_FUNCTION_insert(ret,f);
return(ret);
}
};
typedef int sk_cmp_fn_type(const char * const *a, const char * const *b);
-DECLARE_STACK_OF(EVP_PKEY_ASN1_METHOD);
+DECLARE_STACK_OF(EVP_PKEY_ASN1_METHOD)
static STACK_OF(EVP_PKEY_ASN1_METHOD) *app_methods = NULL;
#include "asn1_locl.h"
typedef STACK_OF(X509_NAME_ENTRY) STACK_OF_X509_NAME_ENTRY;
-DECLARE_STACK_OF(STACK_OF_X509_NAME_ENTRY);
+DECLARE_STACK_OF(STACK_OF_X509_NAME_ENTRY)
static int x509_name_ex_d2i(ASN1_VALUE **val,
const unsigned char **in, long len,
static void value_free_hash_doall_arg(CONF_VALUE *a, LHASH_OF(CONF_VALUE) *conf)
{
if (a->name != NULL)
- lh_CONF_VALUE_delete(conf,a);
+ (void)lh_CONF_VALUE_delete(conf,a);
}
static void value_free_stack_doall(CONF_VALUE *a)
goto end;
}
fnd->funct = NULL;
- lh_ENGINE_PILE_insert(&(*table)->piles, fnd);
+ (void)lh_ENGINE_PILE_insert(&(*table)->piles, fnd);
}
/* A registration shouldn't add duplciate entries */
(void)sk_ENGINE_delete_ptr(fnd->sk, e);
/* Password based encryption (PBE) functions */
-DECLARE_STACK_OF(EVP_PBE_CTL);
+DECLARE_STACK_OF(EVP_PBE_CTL)
static STACK_OF(EVP_PBE_CTL) *pbe_algs;
/* Setup a cipher context from a PBE algorithm */
typedef int sk_cmp_fn_type(const char * const *a, const char * const *b);
-DECLARE_STACK_OF(EVP_PKEY_METHOD);
+DECLARE_STACK_OF(EVP_PKEY_METHOD)
STACK_OF(EVP_PKEY_METHOD) *app_pkey_methods = NULL;
extern const EVP_PKEY_METHOD rsa_pkey_meth, dh_pkey_meth, dsa_pkey_meth;
{
/* Because we're inside the ex_data lock, the
* return value from the insert will be NULL */
- lh_EX_CLASS_ITEM_insert(ex_data, gen);
+ (void)lh_EX_CLASS_ITEM_insert(ex_data, gen);
p = gen;
}
}
if (next != NULL)
{
next->references++;
- lh_APP_INFO_insert(amih,next);
+ (void)lh_APP_INFO_insert(amih,next);
}
#ifdef LEVITTE_DEBUG_MEM
if (ret->thread_id != tmp.thread_id || ret->thread_idptr != tmp.thread_idptr)
#endif
mp->addr=addr2;
mp->num=num;
- lh_MEM_insert(mh,mp);
+ (void)lh_MEM_insert(mh,mp);
}
MemCheck_on(); /* release MALLOC2 lock
/* NB: The prototypes have been typedef'd to CRYPTO_MEM_LEAK_CB inside crypto.h
* If this code is restructured, remove the callback type if it is no longer
* needed. -- Geoff Thorpe */
-static void cb_leak_doall_arg(const MEM *m, CRYPTO_MEM_LEAK_CB *cb)
+
+/* Can't pass CRYPTO_MEM_LEAK_CB directly to lh_MEM_doall_arg because it
+ * is a function pointer and conversion to void * is prohibited. Instead
+ * pass its address
+ */
+
+typedef CRYPTO_MEM_LEAK_CB *PCRYPTO_MEM_LEAK_CB;
+
+static void cb_leak_doall_arg(const MEM *m, PCRYPTO_MEM_LEAK_CB *cb)
{
- cb(m->order,m->file,m->line,m->num,m->addr);
+ (*cb)(m->order,m->file,m->line,m->num,m->addr);
}
-static IMPLEMENT_LHASH_DOALL_ARG_FN(cb_leak, const MEM, CRYPTO_MEM_LEAK_CB)
+static IMPLEMENT_LHASH_DOALL_ARG_FN(cb_leak, const MEM, PCRYPTO_MEM_LEAK_CB)
void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb)
{
if (mh == NULL) return;
CRYPTO_w_lock(CRYPTO_LOCK_MALLOC2);
- lh_MEM_doall_arg(mh, LHASH_DOALL_ARG_FN(cb_leak), CRYPTO_MEM_LEAK_CB,
- cb);
+ lh_MEM_doall_arg(mh, LHASH_DOALL_ARG_FN(cb_leak), PCRYPTO_MEM_LEAK_CB,
+ &cb);
CRYPTO_w_unlock(CRYPTO_LOCK_MALLOC2);
}
#include <openssl/objects.h>
#include "obj_xref.h"
-DECLARE_STACK_OF(nid_triple);
+DECLARE_STACK_OF(nid_triple)
STACK_OF(nid_triple) *sig_app, *sigx_app;
static int cmp_sig(const nid_triple *a, const nid_triple *b)
{
if ((db->qual[i] != NULL) &&
(db->qual[i](row) == 0)) continue;
- lh_STRING_insert(db->index[i],row);
+ (void)lh_STRING_insert(db->index[i],row);
}
}
return(1);
if(!*sk) return 0;
/* Don't add duplicates */
if(sk_STRING_find(*sk, (char *)email->data) != -1) return 1;
- emtmp = BUF_strdup(email->data);
+ emtmp = BUF_strdup((char *)email->data);
if(!emtmp || !sk_STRING_push(*sk, emtmp)) {
X509_email_free(*sk);
*sk = NULL;
{
/* The reason we don't call SSL_CTX_remove_session() is to
* save on locking overhead */
- lh_SSL_SESSION_delete(p->cache,s);
+ (void)lh_SSL_SESSION_delete(p->cache,s);
SSL_SESSION_list_remove(p->ctx,s);
s->not_resumable=1;
if (p->ctx->remove_session_cb != NULL)