From: Howard Chu Date: Mon, 11 Jul 2005 10:39:32 +0000 (+0000) Subject: ITS#3847 silence warnings X-Git-Tag: OPENLDAP_AC_BP~423 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6754d025f22ef103fa81a04584a10c1be5e33b72;p=openldap ITS#3847 silence warnings --- diff --git a/libraries/libldap/cyrus.c b/libraries/libldap/cyrus.c index 553d39faa9..df4ee9ed58 100644 --- a/libraries/libldap/cyrus.c +++ b/libraries/libldap/cyrus.c @@ -207,7 +207,7 @@ sb_sasl_pkt_length( const unsigned char *buf, int debuglevel ) | buf[1] << 16 | buf[2] << 8 | buf[3]; - + if ( size > SASL_MAX_BUFF_SIZE ) { /* somebody is trying to mess me up. */ ber_log_printf( LDAP_DEBUG_ANY, debuglevel, @@ -895,7 +895,7 @@ void ldap_pvt_sasl_secprops_unparse( comma = 0; for ( i=0; !BER_BVISNULL( &sprops[i].key ); i++ ) { if ( sprops[i].ival ) { - int v; + int v = 0; switch( sprops[i].ival ) { case GOT_MINSSF: v = secprops->min_ssf; break; @@ -928,7 +928,7 @@ void ldap_pvt_sasl_secprops_unparse( comma = 0; for ( i=0; !BER_BVISNULL( &sprops[i].key ); i++ ) { if ( sprops[i].ival ) { - int v; + int v = 0; switch( sprops[i].ival ) { case GOT_MINSSF: v = secprops->min_ssf; break; diff --git a/libraries/libldap/groupings.c b/libraries/libldap/groupings.c index 24a655d7ff..fe768f17ac 100644 --- a/libraries/libldap/groupings.c +++ b/libraries/libldap/groupings.c @@ -127,6 +127,7 @@ int ldap_grouping_end( LDAPControl **cctrls, int *msgidp ) { + return 0; } int ldap_grouping_end_s( @@ -137,6 +138,7 @@ int ldap_grouping_end_s( LDAPControl **cctrls, struct berval **retgrpdatap ) { + return 0; } #endif diff --git a/libraries/libldap/ppolicy.c b/libraries/libldap/ppolicy.c index d730f93cdf..bf427d4b39 100644 --- a/libraries/libldap/ppolicy.c +++ b/libraries/libldap/ppolicy.c @@ -130,7 +130,7 @@ ldap_parse_passwordpolicy_control( LDAPPasswordPolicyError *errorp ) { BerElement *ber; - int i, exp = -1, grace = -1; + int exp = -1, grace = -1; ber_tag_t tag; ber_len_t berLen; char *last; diff --git a/libraries/libldap/util-int.c b/libraries/libldap/util-int.c index 407d13628d..326fbf9693 100644 --- a/libraries/libldap/util-int.c +++ b/libraries/libldap/util-int.c @@ -463,7 +463,7 @@ static int copy_hostent( int n_alias=0; int total_alias_len=0; int n_addr=0; - int total_addr_len; + int total_addr_len=0; int total_len; /* calculate the size needed for the buffer */ diff --git a/libraries/libldap_r/tpool.c b/libraries/libldap_r/tpool.c index 0148df89fc..04a71b645c 100644 --- a/libraries/libldap_r/tpool.c +++ b/libraries/libldap_r/tpool.c @@ -222,7 +222,6 @@ ldap_pvt_thread_pool_submit ( if (ctx) { LDAP_SLIST_REMOVE_HEAD(&pool->ltp_free_list, ltc_next.l); } else { - int i; ctx = (ldap_int_thread_ctx_t *) LDAP_MALLOC( sizeof(ldap_int_thread_ctx_t)); if (ctx == NULL) { diff --git a/libraries/liblutil/passwd.c b/libraries/liblutil/passwd.c index a152279a5f..9aabb86a85 100644 --- a/libraries/liblutil/passwd.c +++ b/libraries/liblutil/passwd.c @@ -778,9 +778,7 @@ static int chk_crypt( const struct berval * cred, const char **text ) { - char *cr; unsigned int i; - int rc; for( i=0; ibv_len; i++) { if(cred->bv_val[i] == '\0') { @@ -817,7 +815,7 @@ static int chk_unix( const char **text ) { unsigned int i; - char *pw,*cr; + char *pw; for( i=0; ibv_len; i++) { if(cred->bv_val[i] == '\0') {