diff options
author | Simon Rettberg | 2014-03-19 14:35:19 +0100 |
---|---|---|
committer | Simon Rettberg | 2014-03-19 14:35:19 +0100 |
commit | e3806b35a212fc846f3a3e4b61090d9e6196cc1d (patch) | |
tree | 3e65b810aa62557579a348e44b24e205bd057ba3 | |
parent | Work (diff) | |
download | ldadp-e3806b35a212fc846f3a3e4b61090d9e6196cc1d.tar.gz ldadp-e3806b35a212fc846f3a3e4b61090d9e6196cc1d.tar.xz ldadp-e3806b35a212fc846f3a3e4b61090d9e6196cc1d.zip |
Fixed compilation warnings about pointer mismatch on 32bit
-rw-r--r-- | asn1.h | 4 | ||||
-rw-r--r-- | free_ldapsearchfilter.c | 6 | ||||
-rw-r--r-- | ldap_match_sre.c | 2 | ||||
-rw-r--r-- | scan_ldapmodifyrequest.c | 3 | ||||
-rw-r--r-- | scan_ldapsearchfilter.c | 3 | ||||
-rw-r--r-- | scan_ldapsearchrequest.c | 6 |
6 files changed, 13 insertions, 11 deletions
@@ -159,8 +159,8 @@ struct string { }; struct oid { - size_t l; - size_t* a; + unsigned long l; + unsigned long* a; }; enum x509_oid { diff --git a/free_ldapsearchfilter.c b/free_ldapsearchfilter.c index d952f93..21a8e4d 100644 --- a/free_ldapsearchfilter.c +++ b/free_ldapsearchfilter.c @@ -10,9 +10,9 @@ void free_ldapsearchfilter(struct Filter* f) { break; case SUBSTRING: while (f->substrings) { - struct Substring* s=f->substrings->next; - free(f->substrings); - f->substrings=s; + struct Substring* s=f->substrings->next; + free(f->substrings); + f->substrings=s; } default: break; diff --git a/ldap_match_sre.c b/ldap_match_sre.c index b0e69c1..e98d2fc 100644 --- a/ldap_match_sre.c +++ b/ldap_match_sre.c @@ -45,7 +45,7 @@ static int ldap_match_present_sre(struct SearchResultEntry* sre,struct string* s } static int substrmatch(struct Substring* x,struct string* s,int ignorecase) { - int (*diff)(const void* a, unsigned long len, const void* b); + int (*diff)(const void* a, size_t len, const void* b); if (ignorecase) diff=case_diffb; else diff --git a/scan_ldapmodifyrequest.c b/scan_ldapmodifyrequest.c index ba42e4f..8a08388 100644 --- a/scan_ldapmodifyrequest.c +++ b/scan_ldapmodifyrequest.c @@ -27,7 +27,8 @@ size_t scan_ldapmodifyrequest(const char* src,const char* max,struct ModifyReque max=src+res+oslen; if (src+res>=max) goto error; /* need at least one record */ do { - size_t islen, etmp; + size_t islen; + unsigned long etmp; if (last) { struct Modification* cur; if (!(cur=malloc(sizeof(struct Modification)))) goto error; diff --git a/scan_ldapsearchfilter.c b/scan_ldapsearchfilter.c index 0ee2398..3c58df5 100644 --- a/scan_ldapsearchfilter.c +++ b/scan_ldapsearchfilter.c @@ -32,7 +32,8 @@ size_t scan_ldapsearchfilter(const char* src,const char* max,struct Filter** f) { enum asn1_tagclass tc; enum asn1_tagtype tt; - size_t tag,len,res,tmp; + size_t len,res,tmp; + unsigned long tag; const char* nmax; *f=0; if (!(res=scan_asn1tag(src,max,&tc,&tt,&tag))) goto error; diff --git a/scan_ldapsearchrequest.c b/scan_ldapsearchrequest.c index 8b685bf..94163db 100644 --- a/scan_ldapsearchrequest.c +++ b/scan_ldapsearchrequest.c @@ -3,7 +3,7 @@ size_t scan_ldapsearchrequest(const char* src,const char* max, struct SearchRequest* s) { - size_t res,tmp; + size_t res,tmp,elen; unsigned long etmp; signed long ltmp; s->attributes=0; @@ -24,10 +24,10 @@ size_t scan_ldapsearchrequest(const char* src,const char* max, if (!(tmp=scan_ldapsearchfilter(src+res,max,&s->filter))) goto error; res+=tmp; /* now for the attributelist */ - if (!(tmp=scan_asn1SEQUENCE(src+res,max,&etmp))) goto error; + if (!(tmp=scan_asn1SEQUENCE(src+res,max,&elen))) goto error; res+=tmp; { - const char* nmax=src+res+etmp; + const char* nmax=src+res+elen; //#define nmax max struct AttributeDescriptionList** a=&s->attributes; if (nmax>max) goto error; |