From: Hallvard Furuseth Date: Sun, 19 Jan 2003 15:03:25 +0000 (+0000) Subject: Silence gcc warnings (signed vs. unsigned, implicit declarations, unused vars). X-Git-Tag: NO_SLAP_OP_BLOCKS~602 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6a51371fc57e6f3023ee855cef55c783bb463c78;p=openldap Silence gcc warnings (signed vs. unsigned, implicit declarations, unused vars). --- diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index 5671a92297..0b73cd2ab7 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -729,7 +729,7 @@ getNextPage: i = 0; moreEntries = getchar(); while ( moreEntries != EOF && moreEntries != '\n' ) { - if ( i < sizeof(buf) - 1 ) { + if ( i < (int)sizeof(buf) - 1 ) { buf[i] = moreEntries; i++; } diff --git a/libraries/liblutil/uuid.c b/libraries/liblutil/uuid.c index 1fcb5bc97b..a9640c1360 100644 --- a/libraries/liblutil/uuid.c +++ b/libraries/liblutil/uuid.c @@ -21,6 +21,7 @@ #include #include +#include /* get memcmp() */ #ifdef HAVE_UUID_TO_STR # include diff --git a/servers/slapd/ad.c b/servers/slapd/ad.c index a6083bd379..9c13cc1868 100644 --- a/servers/slapd/ad.c +++ b/servers/slapd/ad.c @@ -748,7 +748,8 @@ str2anlist( AttributeName *an, char *in, const char *brkstr ) int ad_define_option( const char *name, const char *fname, int lineno ) { - int i, j, len, optlen; + int i; + unsigned int optlen; if ( options == &lang_option ) { options = NULL; diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index 659c2e78fa..5c619263e2 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -126,7 +126,7 @@ bdb_bt_compare( c = curkey->data; #ifdef WORDS_BIGENDIAN - for( i = 0; i < sizeof(ID); i++) + for( i = 0; i < (int)sizeof(ID); i++) #else for( i = sizeof(ID)-1; i >= 0; i--) #endif diff --git a/servers/slapd/back-ldap/config.c b/servers/slapd/back-ldap/config.c index b61821914c..13e49922d3 100644 --- a/servers/slapd/back-ldap/config.c +++ b/servers/slapd/back-ldap/config.c @@ -444,7 +444,7 @@ suffix_massage_config( */ return -1; - } else if ( len >= sizeof( vbuf_ ) ) { + } else if ( len >= (int)sizeof( vbuf_ ) ) { /* * C99: snprintf returns the required size */ @@ -459,7 +459,7 @@ suffix_massage_config( if ( len == -1 ) { return -1; - } else if ( len >= sizeof( rbuf_ ) ) { + } else if ( len >= (int)sizeof( rbuf_ ) ) { rbuf = ch_malloc( len + 1 ); len = snprintf( rbuf, sizeof( rbuf_ ), "%%1%s)%%2", nrnc->bv_val ); diff --git a/servers/slapd/backglue.c b/servers/slapd/backglue.c index ba839c13ce..591cff21a9 100644 --- a/servers/slapd/backglue.c +++ b/servers/slapd/backglue.c @@ -29,6 +29,7 @@ #include +#include #include #define SLAPD_TOOLS