Change safestack reimplementation to match 0.9.8.
authorDr. Stephen Henson <steve@openssl.org>
Fri, 7 Sep 2007 13:25:15 +0000 (13:25 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Fri, 7 Sep 2007 13:25:15 +0000 (13:25 +0000)
Fix additional gcc 4.2 value not used warnings.

14 files changed:
CHANGES
Makefile.org
crypto/asn1/x_crl.c
crypto/conf/conf_api.c
crypto/conf/conf_mod.c
crypto/engine/eng_table.c
crypto/stack/safestack.h
crypto/x509/x509_vfy.c
crypto/x509/x509_vpm.c
crypto/x509v3/pcy_tree.c
ssl/s2_clnt.c
ssl/s2_srvr.c
ssl/ssl_cert.c
ssl/ssl_ciph.c

diff --git a/CHANGES b/CHANGES
index ec91a92c6d88787631342a7f60dc6e67b2c4f4a6..106f98fc3c8b10ed22ab129a7651deac90e5cc21 100644 (file)
--- a/CHANGES
+++ b/CHANGES
 
   *) Initial incomplete changes to avoid need for function casts in OpenSSL
      some compilers (gcc 4.2 and later) reject their use. Safestack is
-     reimplemented using inline functions: tests show that these calls are
-     typically optimized away by compilers so they have no additional overhead.
-     Update ASN1 to avoid use of legacy functions. 
+     reimplemented.  Update ASN1 to avoid use of legacy functions. 
      [Steve Henson]
 
   *) Win32/64 targets are linked with Winsock2.
index 0dca6317fd55bd5ed364e5292fc2be04795acda7..91557ffe68b4f5da1fb850fd7200be997d4cde38 100644 (file)
@@ -422,6 +422,9 @@ errors:
        (cd engines; $(MAKE) PERL=$(PERL) errors)
        $(PERL) util/ck_errf.pl */*.c */*/*.c
 
+stacks:
+       $(PERL) util/mkstack.pl -write
+
 util/libeay.num::
        $(PERL) util/mkdef.pl crypto update
 
@@ -446,7 +449,7 @@ TABLE: Configure
        (echo 'Output of `Configure TABLE'"':"; \
        $(PERL) Configure TABLE) > TABLE
 
-update: errors util/libeay.num util/ssleay.num crypto/objects/obj_dat.h crypto/objects/obj_xref.h apps/openssl-vms.cnf crypto/bn/bn_prime.h TABLE depend
+update: errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h crypto/objects/obj_xref.h apps/openssl-vms.cnf crypto/bn/bn_prime.h TABLE depend
 
 # Build distribution tar-file. As the list of files returned by "find" is
 # pretty long, on several platforms a "too many arguments" error or similar
index 5fed08643823fb9cef960d54d9374476d96beb3d..d7093df9da82c758c8c0ee8a99ed243d17994c67 100644 (file)
@@ -102,7 +102,7 @@ static int crl_inf_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
                 * would affect the output of X509_CRL_print().
                 */
                case ASN1_OP_D2I_POST:
-               sk_X509_REVOKED_set_cmp_func(a->revoked,X509_REVOKED_cmp);
+               (void)sk_X509_REVOKED_set_cmp_func(a->revoked,X509_REVOKED_cmp);
                break;
        }
        return 1;
index a7082358349e30bcf2b4bbac878aa34d3168650c..599ab25378cbe1064beb16d568f39c5d910ec9c6 100644 (file)
@@ -121,7 +121,7 @@ int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value)
        v = (CONF_VALUE *)lh_insert(conf->data, value);
        if (v != NULL)
                {
-               sk_CONF_VALUE_delete_ptr(ts,v);
+               (void)sk_CONF_VALUE_delete_ptr(ts,v);
                OPENSSL_free(v->name);
                OPENSSL_free(v->value);
                OPENSSL_free(v);
index e40cc50dd67e8ead61832f834b6fc7d4491659a7..bd0e0aad4dfb6bef0e7e0afdbfded68ce0dd0108 100644 (file)
@@ -432,7 +432,7 @@ void CONF_modules_unload(int all)
                if (((md->links > 0) || !md->dso) && !all)
                        continue;
                /* Since we're working in reverse this is OK */
-               sk_CONF_MODULE_delete(supported_modules, i);
+               (void)sk_CONF_MODULE_delete(supported_modules, i);
                module_free(md);
                }
        if (sk_CONF_MODULE_num(supported_modules) == 0)
index a83c3899ee111f02304a9af6bb0263f2a0a3ba8d..0c1656168d50d60ed45a8bfdd6889eb4e089f6f4 100644 (file)
@@ -147,7 +147,7 @@ int engine_table_register(ENGINE_TABLE **table, ENGINE_CLEANUP_CB *cleanup,
                        lh_insert(&(*table)->piles, fnd);
                        }
                /* A registration shouldn't add duplciate entries */
-               sk_ENGINE_delete_ptr(fnd->sk, e);
+               (void)sk_ENGINE_delete_ptr(fnd->sk, e);
                /* if 'setdefault', this ENGINE goes to the head of the list */
                if(!sk_ENGINE_push(fnd->sk, e))
                        goto end;
@@ -178,7 +178,7 @@ static void int_unregister_cb(ENGINE_PILE *pile, ENGINE *e)
        /* Iterate the 'c->sk' stack removing any occurance of 'e' */
        while((n = sk_ENGINE_find(pile->sk, e)) >= 0)
                {
-               sk_ENGINE_delete(pile->sk, n);
+               (void)sk_ENGINE_delete(pile->sk, n);
                /* "touch" this ENGINE_CIPHER */
                pile->uptodate = 1;
                }
index 5810bca1e9be77b01b87e19673937675113737a3..250929bf7d97943c36ff15ff0da0275da1317aad 100644 (file)
@@ -1,5 +1,5 @@
 /* ====================================================================
- * Copyright (c) 1999-2006 The OpenSSL Project.  All rights reserved.
+ * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 #include <openssl/stack.h>
 
-#ifndef OPENSSL_ALLOW_FCAST
-
-#ifndef OPENSSL_INLINE
-# if defined(__SUNPRO_C) && !defined(__inline)
-#  if __SUNPRO_C>0x520
-#    define __inline inline
-#  else
-#    define __inline
-#  endif
-# endif
-# define OPENSSL_INLINE __inline static
-#endif
-
-#define STACK_OF(type) struct stack_st_##type
-
-#define IMPLEMENT_STACK_OF(type) /* nada (obsolete in new safestack approach)*/
-
-#define DECLARE_STACK_OF(type) \
-STACK_OF(type) \
-    { \
-    STACK stack; \
-    }; \
-OPENSSL_INLINE STACK_OF(type) *sk_##type##_new( \
-       int (*cmp)(const type * const *, const type *const *)) \
-    { return (STACK_OF(type) *)sk_new((int (*)(const char * const *, const char * const *))cmp); } \
-OPENSSL_INLINE STACK_OF(type) *sk_##type##_new_null(void) \
-    { return (STACK_OF(type) *)sk_new_null(); } \
-OPENSSL_INLINE void sk_##type##_free(STACK_OF(type) *sk) \
-    { sk_free((STACK *)sk); } \
-OPENSSL_INLINE int sk_##type##_num(const STACK_OF(type) *sk) \
-    { return M_sk_num((const STACK *)sk); } \
-OPENSSL_INLINE type *sk_##type##_value(const STACK_OF(type) *sk,int n) \
-    { return (type *)sk_value((STACK *)sk,n); } \
-OPENSSL_INLINE type *sk_##type##_set(STACK_OF(type) *sk,int n,type *v) \
-    { return (type *)(sk_set((STACK *)sk,n,(char *)v)); } \
-OPENSSL_INLINE void sk_##type##_zero(STACK_OF(type) *sk) \
-    { sk_zero((STACK *)sk); } \
-OPENSSL_INLINE int sk_##type##_push(STACK_OF(type) *sk,type *v) \
-    { return sk_push((STACK *)sk,(char *)v); } \
-OPENSSL_INLINE int sk_##type##_unshift(STACK_OF(type) *sk,type *v) \
-    { return sk_unshift((STACK *)sk,(char *)v); } \
-OPENSSL_INLINE int sk_##type##_find(STACK_OF(type) *sk,type *v) \
-    { return sk_find((STACK *)sk,(char *)v); } \
-OPENSSL_INLINE type *sk_##type##_delete(STACK_OF(type) *sk,int n) \
-    { return (type *)sk_delete((STACK *)sk,n); } \
-OPENSSL_INLINE void sk_##type##_delete_ptr(STACK_OF(type) *sk,type *v) \
-    { sk_delete_ptr((STACK *)sk,(char *)v); } \
-OPENSSL_INLINE int sk_##type##_insert(STACK_OF(type) *sk,type *v,int n) \
-    { return sk_insert((STACK *)sk,(char *)v,n); } \
-OPENSSL_INLINE int (*sk_##type##_set_cmp_func(STACK_OF(type) *sk, \
-    int (*cmp)(const type * const *,const type * const *))) \
-       (const type *const *,const type *const *) \
-    { return (int (*)(const type * const *,const type *const *)) \
-       sk_set_cmp_func((STACK *)sk,(int(*)(const char * const *, const char * const *))cmp); } \
-OPENSSL_INLINE STACK_OF(type) *sk_##type##_dup(STACK_OF(type) *sk) \
-    { return (STACK_OF(type) *)sk_dup((STACK *)sk); } \
-OPENSSL_INLINE void sk_##type##_pop_free(STACK_OF(type) *sk,void (*func)(type *)) \
-    { sk_pop_free((STACK *)sk,(void (*)(void *))func); } \
-OPENSSL_INLINE type *sk_##type##_shift(STACK_OF(type) *sk) \
-    { return (type *)sk_shift((STACK *)sk); } \
-OPENSSL_INLINE type *sk_##type##_pop(STACK_OF(type) *sk) \
-    { return (type *)sk_pop((STACK *)sk); } \
-OPENSSL_INLINE void sk_##type##_sort(STACK_OF(type) *sk) \
-    { sk_sort((STACK *)sk); } \
-OPENSSL_INLINE int sk_##type##_is_sorted(const STACK_OF(type) *sk) \
-    { return sk_is_sorted((const STACK *)sk); }
-
+#ifdef DEBUG_SAFESTACK
 
-#else
+#ifndef CHECKED_PTR_OF
+#define CHECKED_PTR_OF(type, p) \
+    ((void*) (1 ? p : (type*)0))
+#endif
 
-typedef void (*openssl_fptr)(void);
-#define openssl_fcast(f) ((openssl_fptr)f)
+#define CHECKED_SK_FREE_FUNC(type, p) \
+    ((void (*)(void *)) ((1 ? p : (void (*)(type *))0)))
 
-#ifdef DEBUG_SAFESTACK
+#define CHECKED_SK_CMP_FUNC(type, p) \
+    ((int (*)(const char * const *, const char * const *)) \
+       ((1 ? p : (int (*)(const type * const *, const type * const *))0)))
 
 #define STACK_OF(type) struct stack_st_##type
 #define PREDECLARE_STACK_OF(type) STACK_OF(type);
@@ -146,76 +85,71 @@ STACK_OF(type) \
 /* SKM_sk_... stack macros are internal to safestack.h:
  * never use them directly, use sk_<type>_... instead */
 #define SKM_sk_new(type, cmp) \
-       ((STACK_OF(type) * (*)(int (*)(const type * const *, const type * const *)))openssl_fcast(sk_new))(cmp)
+       ((STACK_OF(type) *)sk_new(CHECKED_SK_CMP_FUNC(type, cmp)))
 #define SKM_sk_new_null(type) \
-       ((STACK_OF(type) * (*)(void))openssl_fcast(sk_new_null))()
+       ((STACK_OF(type) *)sk_new_null())
 #define SKM_sk_free(type, st) \
-       ((void (*)(STACK_OF(type) *))openssl_fcast(sk_free))(st)
+       sk_free(CHECKED_PTR_OF(STACK_OF(type), st))
 #define SKM_sk_num(type, st) \
-       ((int (*)(const STACK_OF(type) *))openssl_fcast(sk_num))(st)
+       sk_num(CHECKED_PTR_OF(STACK_OF(type), st))
 #define SKM_sk_value(type, st,i) \
-       ((type * (*)(const STACK_OF(type) *, int))openssl_fcast(sk_value))(st, i)
+       ((type *)sk_value(CHECKED_PTR_OF(STACK_OF(type), st), i))
 #define SKM_sk_set(type, st,i,val) \
-       ((type * (*)(STACK_OF(type) *, int, type *))openssl_fcast(sk_set))(st, i, val)
+       sk_set(CHECKED_PTR_OF(STACK_OF(type), st), i, CHECKED_PTR_OF(type, val))
 #define SKM_sk_zero(type, st) \
-       ((void (*)(STACK_OF(type) *))openssl_fcast(sk_zero))(st)
+       sk_zero(CHECKED_PTR_OF(STACK_OF(type), st))
 #define SKM_sk_push(type, st,val) \
-       ((int (*)(STACK_OF(type) *, type *))openssl_fcast(sk_push))(st, val)
+       sk_push(CHECKED_PTR_OF(STACK_OF(type), st), CHECKED_PTR_OF(type, val))
 #define SKM_sk_unshift(type, st,val) \
-       ((int (*)(STACK_OF(type) *, type *))openssl_fcast(sk_unshift))(st, val)
+       sk_unshift(CHECKED_PTR_OF(STACK_OF(type), st), CHECKED_PTR_OF(type, val))
 #define SKM_sk_find(type, st,val) \
-       ((int (*)(STACK_OF(type) *, type *))openssl_fcast(sk_find))(st, val)
+       sk_find(CHECKED_PTR_OF(STACK_OF(type), st), CHECKED_PTR_OF(type, val))
 #define SKM_sk_delete(type, st,i) \
-       ((type * (*)(STACK_OF(type) *, int))openssl_fcast(sk_delete))(st, i)
+       (type *)sk_delete(CHECKED_PTR_OF(STACK_OF(type), st), i)
 #define SKM_sk_delete_ptr(type, st,ptr) \
-       ((type * (*)(STACK_OF(type) *, type *))openssl_fcast(sk_delete_ptr))(st, ptr)
+       (type *)sk_delete_ptr(CHECKED_PTR_OF(STACK_OF(type), st), CHECKED_PTR_OF(type, ptr))
 #define SKM_sk_insert(type, st,val,i) \
-       ((int (*)(STACK_OF(type) *, type *, int))openssl_fcast(sk_insert))(st, val, i)
+       sk_insert(CHECKED_PTR_OF(STACK_OF(type), st), CHECKED_PTR_OF(type, val), i)
 #define SKM_sk_set_cmp_func(type, st,cmp) \
-       ((int (*(*)(STACK_OF(type) *, int (*)(const type * const *, const type * const *))) \
-         (const type * const *, const type * const *))openssl_fcast(sk_set_cmp_func))\
-       (st, cmp)
+       ((int (*)(const type * const *,const type * const *)) \
+       sk_set_cmp_func(CHECKED_PTR_OF(STACK_OF(type), st), CHECKED_SK_CMP_FUNC(type, cmp)))
 #define SKM_sk_dup(type, st) \
-       ((STACK_OF(type) *(*)(STACK_OF(type) *))openssl_fcast(sk_dup))(st)
+       (STACK_OF(type) *)sk_dup(CHECKED_PTR_OF(STACK_OF(type), st))
 #define SKM_sk_pop_free(type, st,free_func) \
-       ((void (*)(STACK_OF(type) *, void (*)(type *)))openssl_fcast(sk_pop_free))\
-       (st, free_func)
+       sk_pop_free(CHECKED_PTR_OF(STACK_OF(type), st), CHECKED_SK_FREE_FUNC(type, free_func))
 #define SKM_sk_shift(type, st) \
-       ((type * (*)(STACK_OF(type) *))openssl_fcast(sk_shift))(st)
+       (type *)sk_shift(CHECKED_PTR_OF(STACK_OF(type), st))
 #define SKM_sk_pop(type, st) \
-       ((type * (*)(STACK_OF(type) *))openssl_fcast(sk_pop))(st)
+       (type *)sk_pop(CHECKED_PTR_OF(STACK_OF(type), st))
 #define SKM_sk_sort(type, st) \
-       ((void (*)(STACK_OF(type) *))openssl_fcast(sk_sort))(st)
+       sk_sort(CHECKED_PTR_OF(STACK_OF(type), st))
 #define SKM_sk_is_sorted(type, st) \
-       ((int (*)(const STACK_OF(type) *))openssl_fcast(sk_is_sorted))(st)
+       sk_is_sorted(CHECKED_PTR_OF(STACK_OF(type), st))
 
 #define        SKM_ASN1_SET_OF_d2i(type, st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
-((STACK_OF(type) * (*) (STACK_OF(type) **,const unsigned char **, long , \
-                         type *(*)(type **, const unsigned char **,long), \
-                                void (*)(type *), int ,int )) openssl_fcast(d2i_ASN1_SET)) \
-                       (st,pp,length, d2i_func, free_func, ex_tag,ex_class)
+       (STACK_OF(type) *)d2i_ASN1_SET(CHECKED_PTR_OF(STACK_OF(type), st), \
+                               pp, length, \
+                               CHECKED_D2I_OF(type, d2i_func), \
+                               CHECKED_SK_FREE_FUNC(type, free_func), \
+                               ex_tag, ex_class)
+
 #define        SKM_ASN1_SET_OF_i2d(type, st, pp, i2d_func, ex_tag, ex_class, is_set) \
-       ((int (*)(STACK_OF(type) *,unsigned char **, \
-        int (*)(type *,unsigned char **), int , int , int)) openssl_fcast(i2d_ASN1_SET)) \
-                                               (st,pp,i2d_func,ex_tag,ex_class,is_set)
+       i2d_ASN1_SET(CHECKED_PTR_OF(STACK_OF(type), st), pp, \
+                               CHECKED_I2D_OF(type, i2d_func), \
+                               ex_tag, ex_class, is_set)
 
 #define        SKM_ASN1_seq_pack(type, st, i2d_func, buf, len) \
-       ((unsigned char *(*)(STACK_OF(type) *, \
-        int (*)(type *,unsigned char **), unsigned char **,int *)) openssl_fcast(ASN1_seq_pack)) \
-                               (st, i2d_func, buf, len)
+       ASN1_seq_pack(CHECKED_PTR_OF(STACK_OF(type), st), \
+                       CHECKED_I2D_OF(type, i2d_func), buf, len)
+
 #define        SKM_ASN1_seq_unpack(type, buf, len, d2i_func, free_func) \
-       ((STACK_OF(type) * (*)(const unsigned char *,int, \
-                              type *(*)(type **,const unsigned char **, long), \
-                              void (*)(type *)))openssl_fcast(ASN1_seq_unpack)) \
-                                       (buf,len,d2i_func, free_func)
+       (STACK_OF(type) *)ASN1_seq_unpack(buf, len, CHECKED_D2I_OF(type, d2i_func), CHECKED_SK_FREE_FUNC(type, free_func))
 
 #define SKM_PKCS12_decrypt_d2i(type, algor, d2i_func, free_func, pass, passlen, oct, seq) \
-       ((STACK_OF(type) * (*)(X509_ALGOR *, \
-                       type *(*)(type **, const unsigned char **, long), \
-                               void (*)(type *), \
-                                const char *, int, \
-                                ASN1_STRING *, int))PKCS12_decrypt_d2i) \
-                               (algor,d2i_func,free_func,pass,passlen,oct,seq)
+       (STACK_OF(type) *)PKCS12_decrypt_d2i(algor, \
+                               CHECKED_D2I_OF(type, d2i_func), \
+                               CHECKED_SK_FREE_FUNC(type, free_func), \
+                               pass, passlen, oct, seq)
 
 #else
 
@@ -810,7 +744,6 @@ STACK_OF(type) \
 #define sk_GENERAL_SUBTREE_sort(st) SKM_sk_sort(GENERAL_SUBTREE, (st))
 #define sk_GENERAL_SUBTREE_is_sorted(st) SKM_sk_is_sorted(GENERAL_SUBTREE, (st))
 
-#ifndef OPENSSL_NO_RFC3779
 #define sk_IPAddressFamily_new(st) SKM_sk_new(IPAddressFamily, (st))
 #define sk_IPAddressFamily_new_null() SKM_sk_new_null(IPAddressFamily)
 #define sk_IPAddressFamily_free(st) SKM_sk_free(IPAddressFamily, (st))
@@ -854,7 +787,6 @@ STACK_OF(type) \
 #define sk_IPAddressOrRange_pop(st) SKM_sk_pop(IPAddressOrRange, (st))
 #define sk_IPAddressOrRange_sort(st) SKM_sk_sort(IPAddressOrRange, (st))
 #define sk_IPAddressOrRange_is_sorted(st) SKM_sk_is_sorted(IPAddressOrRange, (st))
-#endif /* OPENSSL_NO_RFC3779 */
 
 #define sk_KRB5_APREQBODY_new(st) SKM_sk_new(KRB5_APREQBODY, (st))
 #define sk_KRB5_APREQBODY_new_null() SKM_sk_new_null(KRB5_APREQBODY)
@@ -2056,6 +1988,4 @@ STACK_OF(type) \
        SKM_PKCS12_decrypt_d2i(PKCS7, (algor), (d2i_func), (free_func), (pass), (passlen), (oct), (seq))
 /* End of util/mkstack.pl block, you may now edit :-) */
 
-#endif
-
 #endif /* !defined HEADER_SAFESTACK_H */
index ba2c3836f5b69558978b8a387bc402b36d7d5190..609606c13eb1f7e16652b473c4bcc84d8164641f 100644 (file)
@@ -166,7 +166,7 @@ int X509_verify_cert(X509_STORE_CTX *ctx)
                                        goto end;
                                        }
                                CRYPTO_add(&xtmp->references,1,CRYPTO_LOCK_X509);
-                               sk_X509_delete_ptr(sktmp,xtmp);
+                               (void)sk_X509_delete_ptr(sktmp,xtmp);
                                ctx->last_untrusted++;
                                x=xtmp;
                                num++;
index 5e69259a7934b40c9656a84f475c3c5118a1abc7..e9db6d62a74984ca0ac241af2b7f13e350d02392 100644 (file)
@@ -385,7 +385,7 @@ int X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param)
                        {
                        ptmp = sk_X509_VERIFY_PARAM_value(param_table, idx);
                        X509_VERIFY_PARAM_free(ptmp);
-                       sk_X509_VERIFY_PARAM_delete(param_table, idx);
+                       (void)sk_X509_VERIFY_PARAM_delete(param_table, idx);
                        }
                }
        if (!sk_X509_VERIFY_PARAM_push(param_table, param))
index 27d29f25a84e7733f94a3b08b01300f6c9943f4d..4fda1d419af6da9488b7a952eedd60920265e8c1 100644 (file)
@@ -345,7 +345,7 @@ static int tree_prune(X509_POLICY_TREE *tree, X509_POLICY_LEVEL *curr)
                        {
                        node->parent->nchild--;
                        OPENSSL_free(node);
-                       sk_X509_POLICY_NODE_delete(curr->nodes, i);
+                       (void)sk_X509_POLICY_NODE_delete(curr->nodes, i);
                        }
                }
 
@@ -358,7 +358,7 @@ static int tree_prune(X509_POLICY_TREE *tree, X509_POLICY_LEVEL *curr)
                                {
                                node->parent->nchild--;
                                OPENSSL_free(node);
-                               sk_X509_POLICY_NODE_delete(curr->nodes, i);
+                               (void)sk_X509_POLICY_NODE_delete(curr->nodes, i);
                                }
                        }
                if (curr->anyPolicy && !curr->anyPolicy->nchild)
index 7b3b7d8eac2aab4d58a2f9b6635be53af95b05df..e976ba82e9f87a44d9ddc02d6f3148a09741b576 100644 (file)
@@ -466,11 +466,11 @@ static int get_server_hello(SSL *s)
                        return(-1);
                        }
 
-               sk_SSL_CIPHER_set_cmp_func(sk,ssl_cipher_ptr_id_cmp);
+               (void)sk_SSL_CIPHER_set_cmp_func(sk,ssl_cipher_ptr_id_cmp);
 
                /* get the array of ciphers we will accept */
                cl=SSL_get_ciphers(s);
-               sk_SSL_CIPHER_set_cmp_func(cl,ssl_cipher_ptr_id_cmp);
+               (void)sk_SSL_CIPHER_set_cmp_func(cl,ssl_cipher_ptr_id_cmp);
 
                /*
                 * If server preference flag set, choose the first
index fa21d6fe68a80c0917af252d6979b66ce43784e1..6490d0bf1b5ed51c4916e5c977d3ac11cc313ab7 100644 (file)
@@ -657,7 +657,7 @@ static int get_client_hello(SSL *s)
                        {
                        if (sk_SSL_CIPHER_find(allow,sk_SSL_CIPHER_value(prio,z)) < 0)
                                {
-                               sk_SSL_CIPHER_delete(prio,z);
+                               (void)sk_SSL_CIPHER_delete(prio,z);
                                z--;
                                }
                        }
index bb07175dcf607f1ca357c26d179f075a25fa3fe6..ccb30e0760d20e04d64a4c2d87692af996502b1e 100644 (file)
@@ -764,7 +764,7 @@ err:
        if(x != NULL)
                X509_free(x);
        
-       sk_X509_NAME_set_cmp_func(stack,oldcmp);
+       (void)sk_X509_NAME_set_cmp_func(stack,oldcmp);
 
        return ret;
        }
index e5730251ae2306f1fae594ae995510f35222051b..5ba5b32a073a31678c72b9018c80532cf0a8c47f 100644 (file)
@@ -1417,7 +1417,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
        if (*cipher_list_by_id != NULL)
                sk_SSL_CIPHER_free(*cipher_list_by_id);
        *cipher_list_by_id = tmp_cipher_list;
-       sk_SSL_CIPHER_set_cmp_func(*cipher_list_by_id,ssl_cipher_ptr_id_cmp);
+       (void)sk_SSL_CIPHER_set_cmp_func(*cipher_list_by_id,ssl_cipher_ptr_id_cmp);
 
        return(cipherstack);
        }