]> git.sur5r.net Git - openldap/commitdiff
Warning fixes
authorQuanah Gibson-Mount <quanah@openldap.org>
Tue, 17 Feb 2009 22:02:51 +0000 (22:02 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 17 Feb 2009 22:02:51 +0000 (22:02 +0000)
libraries/libldap/abandon.c
libraries/libldap/gssapi.c
libraries/libldap/ldap-int.h
libraries/libldap/os-ip.c
libraries/libldap/os-local.c
libraries/libldap/result.c
libraries/liblutil/meter.c

index bc7e5fe4a17499e459cd8d51a12786e7ef33292c..e8b32a0f3e4452dc953fceeea7a411896a5478b2 100644 (file)
@@ -349,7 +349,6 @@ ldap_int_bisect_find( ber_int_t *v, ber_len_t n, ber_int_t id, int *idxp )
                        end,
                        rc = 0;
 
-       assert( n >= 0 );
        assert( id >= 0 );
 
        begin = 0;
@@ -410,7 +409,6 @@ ldap_int_bisect_insert( ber_int_t **vp, ber_len_t *np, int id, int idx )
 
        assert( vp != NULL );
        assert( np != NULL );
-       assert( *np >= 0 );
        assert( idx >= 0 );
        assert( (unsigned) idx <= *np );
 
@@ -451,7 +449,6 @@ ldap_int_bisect_delete( ber_int_t **vp, ber_len_t *np, int id, int idx )
 
        assert( vp != NULL );
        assert( np != NULL );
-       assert( *np >= 0 );
        assert( idx >= 0 );
        assert( (unsigned) idx < *np );
 
index 2f1385f327dbe37725c5b707b83845b80c51df28..c80ca2f8e7e243107b54780b9f9ab74ecceacb14 100644 (file)
@@ -351,8 +351,6 @@ map_gsserr2ldap(
        int gss_rc,
        OM_uint32 minor_status )
 {
-       OM_uint32 min2;
-       OM_uint32 msg_ctx = 0;
        char msg[256];
 
        Debug( LDAP_DEBUG_ANY, "%s\n",
@@ -561,7 +559,7 @@ guess_service_principal(
        }
 
        ret = snprintf( svc_principal, svc_principal_size - 1, principal_fmt, str);
-       if (ret < 0 || ret >= svc_principal_size - 1) {
+       if (ret < 0 || (size_t)ret + 1 >= svc_principal_size) {
                ld->ld_errno = LDAP_LOCAL_ERROR;
                return ld->ld_errno;
        }
@@ -996,7 +994,9 @@ ldap_gssapi_bind(
        LDAP *ld,
        LDAP_CONST char *dn,
        LDAP_CONST char *creds )
-{ return LDAP_NOT_SUPPORTED; }
+{
+       return LDAP_NOT_SUPPORTED;
+}
 
 int
 ldap_gssapi_bind_s(
index 81c4e6e1d18124a5574de1340867725ca7354c48..f079753ed338cc74e6fcc18e0ac234052eae04b5 100644 (file)
@@ -694,6 +694,16 @@ LDAP_F (void) ldap_int_tls_destroy LDAP_P(( struct ldapoptions *lo ));
 LDAP_F (char **) ldap_value_dup LDAP_P((
        char *const *vals ));
 
+/*
+ *     in gssapi.c
+ */
+#ifdef HAVE_GSSAPI
+LDAP_F(int) ldap_int_gssapi_get_option LDAP_P(( LDAP *ld, int option, void *arg ));
+LDAP_F(int) ldap_int_gssapi_set_option LDAP_P(( LDAP *ld, int option, void *arg ));
+LDAP_F(int) ldap_int_gssapi_config LDAP_P(( struct ldapoptions *lo, int option, const char *arg ));
+LDAP_F(void) ldap_int_gssapi_close LDAP_P(( LDAP *ld, LDAPConn *lc ));
+#endif 
+
 LDAP_END_DECL
 
 #endif /* _LDAP_INT_H */
index 3fc414564b0f6fe108e632772c8b76d948ab5dd3..a3a3306f93144293f3d91adc0ea8fd45e323ee18 100644 (file)
@@ -207,7 +207,7 @@ ldap_pvt_is_socket_ready(LDAP *ld, int s)
                == AC_SOCKET_ERROR )
        {
                /* XXX: needs to be replace with ber_stream_read() */
-               int rc = read(s, &ch, 1);
+               (void)read(s, &ch, 1);
                TRACE;
                return -1;
        }
index 3c643c774acbe21e2561e229c65bd8ddd411771b..aafce8b8e25a71410e7827843434b5580ca7a54c 100644 (file)
@@ -149,7 +149,7 @@ ldap_pvt_is_socket_ready(LDAP *ld, int s)
                == AC_SOCKET_ERROR )
        {
                /* XXX: needs to be replace with ber_stream_read() */
-               int rc = read(s, &ch, 1);
+               (void)read(s, &ch, 1);
                TRACE;
                return -1;
        }
index 21f02c9831b338b862801ebcefabc736352b0ee9..ad62a02d30749e00d16a9dcd38f86825ad630ca3 100644 (file)
@@ -106,7 +106,6 @@ ldap_result(
        struct timeval *timeout,
        LDAPMessage **result )
 {
-       LDAPMessage     *lm;
        int             rc;
 
        assert( ld != NULL );
@@ -1384,7 +1383,6 @@ ldap_abandoned( LDAP *ld, ber_int_t msgid, int *idxp )
 
        assert( idxp != NULL );
        assert( msgid >= 0 );
-       assert( ld->ld_nabandoned >= 0 );
 
        return ldap_int_bisect_find( ld->ld_abandoned, ld->ld_nabandoned, msgid, idxp );
 }
index 6c631c7bd780aaa4ccfca8fc510e90523265a999..0bbbdc03078b4fcc605cfe838ea42c0d7b7e16cf 100644 (file)
@@ -141,7 +141,6 @@ lutil_meter_update (
        int rc;
 
        assert( meter != NULL );
-       assert( position >= 0 );
 
        lutil_get_now( &now );