]> git.sur5r.net Git - openldap/commitdiff
fix format and signedness issues
authorPierangelo Masarati <ando@openldap.org>
Thu, 8 Sep 2005 20:18:43 +0000 (20:18 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 8 Sep 2005 20:18:43 +0000 (20:18 +0000)
servers/slapd/back-sql/add.c
servers/slapd/back-sql/entry-id.c
servers/slapd/back-sql/util.c

index d8f3842366997d43305fac8e9e5e31077781ba4e..548bfd835eb809bf2618ca3b471f5b0864c332e5 100644 (file)
@@ -819,7 +819,7 @@ backsql_add_attr(
                        if ( rc != SQL_SUCCESS ) {
                                Debug( LDAP_DEBUG_TRACE,
                                        "   backsql_add_attr(): "
-                                       "error binding output parameter for %s[%d]\n",
+                                       "error binding output parameter for %s[%lu]\n",
                                        at_rec->bam_ad->ad_cname.bv_val, i, 0 );
                                backsql_PrintErrors( bi->sql_db_env, dbh, 
                                        sth, rc );
@@ -840,7 +840,7 @@ backsql_add_attr(
                if ( rc != SQL_SUCCESS ) {
                        Debug( LDAP_DEBUG_TRACE,
                                "   backsql_add_attr(): "
-                               "error binding keyval parameter for %s[%d]\n",
+                               "error binding keyval parameter for %s[%lu]\n",
                                at_rec->bam_ad->ad_cname.bv_val, i, 0 );
                        backsql_PrintErrors( bi->sql_db_env, dbh, 
                                sth, rc );
@@ -861,7 +861,7 @@ backsql_add_attr(
                if ( rc != SQL_SUCCESS ) {
                        Debug( LDAP_DEBUG_TRACE,
                                "   backsql_add_attr(): "
-                               "error binding value parameter for %s[%d]\n",
+                               "error binding value parameter for %s[%lu]\n",
                                at_rec->bam_ad->ad_cname.bv_val, i, 0 );
                        backsql_PrintErrors( bi->sql_db_env, dbh, 
                                sth, rc );
index 9690774a0951edfad36187c4070e39165a0ed0ed..74035025d025a6b559fd8a491e7d09e60bd040f2 100644 (file)
@@ -550,7 +550,7 @@ backsql_get_attr_vals( void *v_at, void *v_bsi )
        }
 
        Debug( LDAP_DEBUG_TRACE, "backsql_get_attr_vals(): "
-               "number of values in query: %d\n", count, 0, 0 );
+               "number of values in query: %lu\n", count, 0, 0 );
        SQLFreeStmt( sth, SQL_DROP );
        if ( count == 0 ) {
                return 1;
@@ -662,7 +662,7 @@ backsql_get_attr_vals( void *v_at, void *v_bsi )
                        BACKSQL_SUCCESS( rc );
                        rc = SQLFetch( sth ), k++ )
        {
-               for ( i = 0; i < row.ncols; i++ ) {
+               for ( i = 0; i < (unsigned long)row.ncols; i++ ) {
 
                        if ( row.value_len[ i ] > 0 ) {
                                struct berval           bv;
@@ -722,11 +722,11 @@ backsql_get_attr_vals( void *v_at, void *v_bsi )
                                         * but we're accepting the attributes;
                                         * should we fail at all? */
                                        snprintf( buf, sizeof( buf ),
-                                                       "unable to %s value #%d "
+                                                       "unable to %s value #%lu "
                                                        "of AttributeDescription %s",
                                                        pretty ? "prettify" : "validate",
-                                                       at->bam_ad->ad_cname.bv_val,
-                                                       k - oldcount );
+                                                       k - oldcount,
+                                                       at->bam_ad->ad_cname.bv_val );
                                        Debug( LDAP_DEBUG_TRACE,
                                                "==>backsql_get_attr_vals(\"%s\"): "
                                                "%s (%d)\n",
@@ -757,10 +757,10 @@ backsql_get_attr_vals( void *v_at, void *v_bsi )
                                                 * but we're accepting the attributes;
                                                 * should we fail at all? */
                                                snprintf( buf, sizeof( buf ),
-                                                       "unable to normalize value #%d "
+                                                       "unable to normalize value #%lu "
                                                        "of AttributeDescription %s",
-                                                       at->bam_ad->ad_cname.bv_val,
-                                                       k - oldcount );
+                                                       k - oldcount,
+                                                       at->bam_ad->ad_cname.bv_val );
                                                Debug( LDAP_DEBUG_TRACE,
                                                        "==>backsql_get_attr_vals(\"%s\"): "
                                                        "%s (%d)\n",
index 4bb276f0f2d620fb5ee8909bd6a3b9b52eab5db1..eee55942e54a265d3611c8ac3455db8715f61638 100644 (file)
@@ -522,9 +522,9 @@ backsql_entryUUID(
        /* note: works only with 32 bit architectures... */
        snprintf( uuidbuf, sizeof( uuidbuf ),
                        "%08x-%04x-%04x-0000-000000000000",
-                       ( id->eid_oc_id & 0xFFFFFFFF ),
-                       ( ( id->eid_keyval & 0xFFFF0000 ) >> 020 /* 16 */ ),
-                       ( id->eid_keyval & 0xFFFF ) );
+                       ( (unsigned)id->eid_oc_id & 0xFFFFFFFF ),
+                       ( ( (unsigned)id->eid_keyval & 0xFFFF0000 ) >> 020 /* 16 */ ),
+                       ( (unsigned)id->eid_keyval & 0xFFFF ) );
 #endif /* ! BACKSQL_ARBITRARY_KEY */
 
        uuid.bv_val = uuidbuf;