From: Howard Chu Date: Thu, 11 Apr 2002 08:46:34 +0000 (+0000) Subject: ITS#1732 signed/unsigned integers X-Git-Tag: OPENLDAP_REL_ENG_2_MP~225 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d4465e376f7a9bdc78e50512942ba58ac5d40189;p=openldap ITS#1732 signed/unsigned integers --- diff --git a/servers/slapd/back-ldbm/idl.c b/servers/slapd/back-ldbm/idl.c index 011a01a3be..2fe5d6fd04 100644 --- a/servers/slapd/back-ldbm/idl.c +++ b/servers/slapd/back-ldbm/idl.c @@ -31,7 +31,7 @@ static void cont_alloc( Datum *cont, Datum *key ) static void cont_id( Datum *cont, ID id ) { - int i; + unsigned int i; for( i=1; i <= sizeof(id); i++) { ((unsigned char *)cont->dptr)[i] = (unsigned char)(id & 0xFF); diff --git a/servers/slapd/back-meta/search.c b/servers/slapd/back-meta/search.c index 49edc7a8ad..6e8f2def32 100644 --- a/servers/slapd/back-meta/search.c +++ b/servers/slapd/back-meta/search.c @@ -197,7 +197,7 @@ meta_back_search( for ( i = 0, lsc = lc->conns; lsc[ 0 ] != NULL; ++i, ++lsc ) { char *realbase = ( char * )base->bv_val; int realscope = scope; - int suffixlen; + ber_len_t suffixlen; char *mapped_filter, **mapped_attrs; if ( lsc[ 0 ]->candidate != META_CANDIDATE ) { diff --git a/servers/slapd/module.c b/servers/slapd/module.c index 0fb5f874ab..4a58714d5f 100644 --- a/servers/slapd/module.c +++ b/servers/slapd/module.c @@ -166,7 +166,7 @@ int module_load(const char* file_name, int argc, char *argv[]) return rc; } - if (rc >= (sizeof(module_regtable) / sizeof(struct module_regtable_t)) + if (rc >= (int)(sizeof(module_regtable) / sizeof(struct module_regtable_t)) || module_regtable[rc].proc == NULL) { #ifdef NEW_LOGGING diff --git a/servers/slapd/schemaparse.c b/servers/slapd/schemaparse.c index 1ae61e0b65..171bd3473e 100644 --- a/servers/slapd/schemaparse.c +++ b/servers/slapd/schemaparse.c @@ -45,7 +45,7 @@ static char *const err2text[SLAP_SCHERR_LAST+1] = { char * scherr2str(int code) { - if ( code < 0 || code >= (sizeof(err2text)/sizeof(char *)) ) { + if ( code < 0 || code >= (int)(sizeof(err2text)/sizeof(char *)) ) { return "Unknown error"; } else { return err2text[code];