summaryrefslogtreecommitdiffstats
path: root/crypto/objects
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2008-10-20 15:12:00 +0000
committerDr. Stephen Henson <steve@openssl.org>2008-10-20 15:12:00 +0000
commit606f6c477a0eff3573d26d172bc832add095c44e (patch)
tree77fad8ebb127dac8c960ca2add5492adf1ed4f9e /crypto/objects
parent1581f822439eb6c2aa94565bcbd76430912b40f3 (diff)
Fix a shed load or warnings:
Duplicate const. Use of ; outside function.
Diffstat (limited to 'crypto/objects')
-rw-r--r--crypto/objects/obj_dat.c12
-rw-r--r--crypto/objects/obj_xref.c8
-rw-r--r--crypto/objects/objects.h11
3 files changed, 16 insertions, 15 deletions
diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c
index 2f41aaeb0f..3623e152b1 100644
--- a/crypto/objects/obj_dat.c
+++ b/crypto/objects/obj_dat.c
@@ -81,9 +81,9 @@ static const unsigned int ln_objs[1];
static const unsigned int obj_objs[1];
#endif
-DECLARE_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, const unsigned int, sn_cmp);
-DECLARE_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, const unsigned int, ln_cmp);
-DECLARE_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, const unsigned int, obj_cmp);
+DECLARE_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, sn_cmp);
+DECLARE_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, ln_cmp);
+DECLARE_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, obj_cmp);
#define ADDED_DATA 0
#define ADDED_SNAME 1
@@ -103,12 +103,12 @@ static LHASH_OF(ADDED_OBJ) *added=NULL;
static int sn_cmp(const ASN1_OBJECT * const *a, const unsigned int *b)
{ return(strcmp((*a)->sn,nid_objs[*b].sn)); }
-IMPLEMENT_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, const unsigned int, sn_cmp)
+IMPLEMENT_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, sn_cmp);
static int ln_cmp(const ASN1_OBJECT * const *a, const unsigned int *b)
{ return(strcmp((*a)->ln,nid_objs[*b].ln)); }
-IMPLEMENT_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, const unsigned int, ln_cmp)
+IMPLEMENT_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, ln_cmp);
static unsigned long added_obj_hash(const ADDED_OBJ *ca)
{
@@ -393,7 +393,7 @@ static int obj_cmp(const ASN1_OBJECT * const *ap, const unsigned int *bp)
return(memcmp(a->data,b->data,a->length));
}
-IMPLEMENT_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, const unsigned int, obj_cmp)
+IMPLEMENT_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, obj_cmp);
int OBJ_obj2nid(const ASN1_OBJECT *a)
{
diff --git a/crypto/objects/obj_xref.c b/crypto/objects/obj_xref.c
index 3e85e7a576..30d544b1a4 100644
--- a/crypto/objects/obj_xref.c
+++ b/crypto/objects/obj_xref.c
@@ -67,8 +67,8 @@ static int cmp_sig(const nid_triple *a, const nid_triple *b)
return a->sign_id - b->sign_id;
}
-DECLARE_OBJ_BSEARCH_CMP_FN(const nid_triple, const nid_triple, cmp_sig);
-IMPLEMENT_OBJ_BSEARCH_CMP_FN(const nid_triple, const nid_triple, cmp_sig)
+DECLARE_OBJ_BSEARCH_CMP_FN(nid_triple, nid_triple, cmp_sig);
+IMPLEMENT_OBJ_BSEARCH_CMP_FN(nid_triple, nid_triple, cmp_sig);
static int cmp_sig_sk(const nid_triple * const *a, const nid_triple * const *b)
{
@@ -86,7 +86,7 @@ static int cmp_sigx(const nid_triple * const *a, const nid_triple * const *b)
return (*a)->pkey_id - (*b)->pkey_id;
}
-IMPLEMENT_OBJ_BSEARCH_CMP_FN(const nid_triple *, const nid_triple *, cmp_sigx)
+IMPLEMENT_OBJ_BSEARCH_CMP_FN(const nid_triple *, const nid_triple *, cmp_sigx);
int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid)
{
@@ -120,7 +120,7 @@ int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid)
int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid)
{
nid_triple tmp;
- const nid_triple const *t=&tmp;
+ const nid_triple *t=&tmp;
const nid_triple **rv = NULL;
tmp.hash_id = dig_nid;
diff --git a/crypto/objects/objects.h b/crypto/objects/objects.h
index 7868023af1..3e6d71021b 100644
--- a/crypto/objects/objects.h
+++ b/crypto/objects/objects.h
@@ -1022,7 +1022,7 @@ const void * OBJ_bsearch_ex_(const void *key,const void *base,int num,
scope type1 *cmp##_type_1; \
scope type2 *cmp##_type_2; \
scope int cmp##_BSEARCH_CMP_FN(const void *, const void *); \
- scope int cmp(const type1 const *, const type2 const *)
+ scope int cmp(type1 const *, type2 const *)
#define DECLARE_OBJ_BSEARCH_CMP_FN(type1, type2, cmp) \
_DECLARE_OBJ_BSEARCH_CMP_FN(static, type1, type2, cmp)
@@ -1058,10 +1058,11 @@ const void * OBJ_bsearch_ex_(const void *key,const void *base,int num,
#define _IMPLEMENT_OBJ_BSEARCH_CMP_FN(scope, type1, type2, cmp) \
scope int cmp##_BSEARCH_CMP_FN(const void *a_, const void *b_) \
{ \
- const type1 const *a = a_; \
- const type2 const *b = b_; \
+ type1 const *a = a_; \
+ type2 const *b = b_; \
return cmp(a,b); \
- }
+ } \
+ extern void dummy_prototype(void)
#define IMPLEMENT_OBJ_BSEARCH_CMP_FN(type1, type2, cmp) \
_IMPLEMENT_OBJ_BSEARCH_CMP_FN(static, type1, type2, cmp)
@@ -1076,7 +1077,7 @@ const void * OBJ_bsearch_ex_(const void *key,const void *base,int num,
cmp##_BSEARCH_CMP_FN)))
#define OBJ_bsearch_ex(type1,key,type2,base,num,cmp,flags) \
- ((type2 *)OBJ_bsearch_(CHECKED_PTR_OF(type1,key),CHECKED_PTR_OF(type2,base), \
+ ((type2 *)OBJ_bsearch_ex_(CHECKED_PTR_OF(type1,key),CHECKED_PTR_OF(type2,base), \
num,sizeof(type2), \
((void)CHECKED_PTR_OF(type1,cmp##_type_1), \
(void)type_2=CHECKED_PTR_OF(type2,cmp##_type_2), \