]> git.sur5r.net Git - openldap/commitdiff
Silence warnings
authorQuanah Gibson-Mount <quanah@openldap.org>
Tue, 27 Nov 2007 20:45:37 +0000 (20:45 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 27 Nov 2007 20:45:37 +0000 (20:45 +0000)
servers/slapd/attr.c
servers/slapd/back-meta/config.c
servers/slapd/back-meta/conn.c
servers/slapd/back-sql/back-sql.h
servers/slapd/back-sql/delete.c
servers/slapd/mods.c
servers/slapd/overlays/pcache.c
servers/slapd/result.c
servers/slapd/slapi/slapi_utils.c

index e66b65a84120d0f296016f1f65e52b869651e2a3..2702c9f1c9b9c182e69807ceb8dad061c4ed23f8 100644 (file)
@@ -318,9 +318,8 @@ attr_valfind(
        }
 
        if ( a->a_flags & SLAP_ATTR_SORTED_VALS ) {
-       /* Binary search */
+               /* Binary search */
                unsigned base = 0, n = a->a_numvals;
-               int val = 0;
 
                while ( 0 < n ) {
                        unsigned pivot = n >> 1;
index c29712e59c038b645601265ee91adb485e6f56cf..3cebec281c0b99e6bf09046da4ebf82cd748306b 100644 (file)
@@ -1325,7 +1325,7 @@ idassert-authzFrom        "dn:<rootdn>"
 
                if ( BER_BVISNULL( &be->be_nsuffix[ c ] ) ) {
                        Debug( LDAP_DEBUG_ANY, "%s: line %d: "
-       "%s: line %d: <suffix> \"%s\" must be within the database naming context, in "
+       "<suffix> \"%s\" must be within the database naming context, in "
        "\"suffixMassage <suffix> <massaged suffix>\"\n",
                                fname, lineno, pvnc.bv_val );
                        free( pvnc.bv_val );
index ec4901091453d95459d95b905ff433d0028ab0c8..eba59e52bd043c4b25d69e949199d380d3c82ec3 100644 (file)
@@ -867,7 +867,7 @@ meta_back_get_candidate(
                op2.ors_slimit = 1;
                op2.ors_tlimit = SLAP_NO_LIMIT;
 
-               op2.ors_filter = slap_filter_objectClass_pres;
+               op2.ors_filter = (Filter *)slap_filter_objectClass_pres;
                op2.ors_filterstr = *slap_filterstr_objectClass_pres;
 
                op2.o_callback = &cb2;
index 98d06bc5e6c4f90af31aebc3c40fad82b1a1fb45..b01b45b29eab9a1e3e4aa47d901eba33761e0dbd 100644 (file)
@@ -266,12 +266,6 @@ typedef struct backsql_api {
        struct backsql_api      *ba_next;
 } backsql_api;
 
-#ifdef BACKSQL_ARBITRARY_KEY
-#define BACKSQL_ENTRYID_INIT { BER_BVNULL, BER_BVNULL, 0, BER_BVNULL, BER_BVNULL, NULL }
-#else /* ! BACKSQL_ARBITRARY_KEY */
-#define BACKSQL_ENTRYID_INIT { 0, 0, 0, BER_BVNULL, BER_BVNULL, NULL }
-#endif /* BACKSQL_ARBITRARY_KEY */
-
 /*
  * "structural" objectClass mapping structure
  */
@@ -398,6 +392,12 @@ typedef struct backsql_entryID {
        struct backsql_entryID  *eid_next;
 } backsql_entryID;
 
+#ifdef BACKSQL_ARBITRARY_KEY
+#define BACKSQL_ENTRYID_INIT { BER_BVNULL, BER_BVNULL, 0, NULL, BER_BVNULL, BER_BVNULL, NULL }
+#else /* ! BACKSQL_ARBITRARY_KEY */
+#define BACKSQL_ENTRYID_INIT { 0, 0, 0, NULL, BER_BVNULL, BER_BVNULL, NULL }
+#endif /* BACKSQL_ARBITRARY_KEY */
+
 /* the function must collect the entry associated to nbase */
 #define BACKSQL_ISF_GET_ID     0x1U
 #define BACKSQL_ISF_GET_ENTRY  ( 0x2U | BACKSQL_ISF_GET_ID )
index 15dd62a28abe2afbd40a8ef03fe4bcce63f30cb9..ee819b0a770e652638e68669939501bd7155d4a5 100644 (file)
@@ -293,7 +293,6 @@ static int
 backsql_tree_delete_search_cb( Operation *op, SlapReply *rs )
 {
        if ( rs->sr_type == REP_SEARCH ) {
-               backsql_info            *bi = (backsql_info*)op->o_bd->be_private;
                backsql_tree_delete_t   *btd;
                backsql_entryID         *eid;
 
@@ -367,7 +366,7 @@ backsql_tree_delete(
        op2.ors_deref = LDAP_DEREF_NEVER;
        op2.ors_slimit = SLAP_NO_LIMIT;
        op2.ors_tlimit = SLAP_NO_LIMIT;
-       op2.ors_filter = slap_filter_objectClass_pres;
+       op2.ors_filter = (Filter *)slap_filter_objectClass_pres;
        op2.ors_filterstr = *slap_filterstr_objectClass_pres;
        op2.ors_attrs = slap_anlist_all_attributes;
        op2.ors_attrsonly = 0;
@@ -403,7 +402,6 @@ clean:;
 int
 backsql_delete( Operation *op, SlapReply *rs )
 {
-       backsql_info            *bi = (backsql_info*)op->o_bd->be_private;
        SQLHDBC                 dbh = SQL_NULL_HDBC;
        SQLHSTMT                sth = SQL_NULL_HSTMT;
        backsql_oc_map_rec      *oc = NULL;
index 2d0d01fc8bda05b56838857e97b57d6065483bd2..55459eeaf17c685a075807102e26e386290d1fce 100644 (file)
@@ -69,7 +69,7 @@ modify_add_values(
        if ( a != NULL ) {
                MatchingRule    *mr;
                struct berval *cvals;
-               int             rc, i, j, p;
+               int             rc, i, p;
                unsigned flags;
 
                mr = mod->sm_desc->ad_type->sat_equality;
index ecdd2546ae3cffe8ce350e5664d579480ba3c9f9..68560f1486b93f3501309e24cb08dfceebac1d60 100644 (file)
@@ -2015,6 +2015,9 @@ pcache_op_cleanup( Operation *op, SlapReply *rs ) {
                                case PC_SIZELIMIT:
                                        qc->q_sizelimit = rs->sr_nentries;
                                        break;
+                               default:
+                                       assert( 0 );
+                                       break;
                                }
                                ldap_pvt_thread_rdwr_wunlock(&qc->rwlock);
                                ldap_pvt_thread_mutex_lock(&cm->cache_mutex);
index 7be8d952494c4f50a856de25e982e7e63e31f708..eccc03583288d260ee637f3a370a1628cddf68cb 100644 (file)
@@ -742,9 +742,10 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
        }
 
        /* Every 64 entries, check for thread pool pause */
-       if (( rs->sr_nentries & 0x3f == 0x3f ) &&
+       if ( ( ( rs->sr_nentries & 0x3f ) == 0x3f ) &&
                ldap_pvt_thread_pool_query( &connection_pool,
-                       LDAP_PVT_THREAD_POOL_PARAM_PAUSING, &i ) == 0 && i ) {
+                       LDAP_PVT_THREAD_POOL_PARAM_PAUSING, &i ) == 0 && i )
+       {
                return LDAP_BUSY;
        }
 
index 928a5e507bf1e9caf8555f0f1811a94b1eb9473c..fafcde1b2faaa937fd09ef3dd1db55fcd4dfd085 100644 (file)
@@ -2153,7 +2153,6 @@ int slapi_attr_value_cmp( const Slapi_Attr *a, const struct berval *v1, const st
 int slapi_attr_value_find( const Slapi_Attr *a, struct berval *v )
 {
        int rc;
-       int ret;
 
        if ( a ->a_vals == NULL ) {
                return -1;