From: Hallvard Furuseth Date: Mon, 4 Jul 2005 05:29:12 +0000 (+0000) Subject: Format fixes (%d<->%lu etc) X-Git-Tag: OPENLDAP_AC_BP~460 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8a696d21b2a0ccd0be7388a2ff60e41cb293e461;p=openldap Format fixes (%d<->%lu etc) --- diff --git a/servers/slapd/bind.c b/servers/slapd/bind.c index c39caea9f6..6dac6e2a6b 100644 --- a/servers/slapd/bind.c +++ b/servers/slapd/bind.c @@ -449,7 +449,7 @@ fe_op_bind( Operation *op, SlapReply *rs ) send_ldap_result( op, rs ); Debug( LDAP_DEBUG_TRACE, - "do_bind: v%d unknown authentication method (%ld)\n", + "do_bind: v%d unknown authentication method (%d)\n", op->o_protocol, op->orb_method, 0 ); goto cleanup; } diff --git a/servers/slapd/component.c b/servers/slapd/component.c index bb66c4cee7..7633af36de 100644 --- a/servers/slapd/component.c +++ b/servers/slapd/component.c @@ -447,7 +447,8 @@ get_componentId( Operation *op, ComponentAssertionValue* cav, type = peek_componentId_type( cav ); - Debug( LDAP_DEBUG_FILTER, "get_compId [%d]\n", type, 0, 0 ); + Debug( LDAP_DEBUG_FILTER, "get_compId [%lu]\n", + (unsigned long) type, 0, 0 ); len = 0; _cid.ci_type = type; _cid.ci_next = NULL; diff --git a/servers/slapd/config.c b/servers/slapd/config.c index d650f37472..acf465c2fd 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -92,7 +92,7 @@ new_config_args( BackendDB *be, const char *fname, int lineno, int argc, char ** c->argc = argc; c->argv = argv; c->lineno = lineno; - snprintf( c->log, sizeof( c->log ), "%s: line %lu", fname, lineno ); + snprintf( c->log, sizeof( c->log ), "%s: line %d", fname, lineno ); return(c); } @@ -1191,7 +1191,7 @@ int config_generic_wrapper( Backend *be, const char *fname, int lineno, c.argc = argc; c.argv = argv; c.valx = -1; - sprintf( c.log, "%s: line %lu", fname, lineno ); + sprintf( c.log, "%s: line %d", fname, lineno ); rc = SLAP_CONF_UNKNOWN; ct = config_find_keyword( be->be_cf_ocs->co_table, &c ); diff --git a/servers/slapd/filter.c b/servers/slapd/filter.c index 7e7a420807..0d7527c0eb 100644 --- a/servers/slapd/filter.c +++ b/servers/slapd/filter.c @@ -173,7 +173,7 @@ get_filter( if( err != LDAP_SUCCESS ) { /* unrecognized attribute description or other error */ Debug( LDAP_DEBUG_ANY, - "get_filter: conn %d unknown attribute " + "get_filter: conn %lu unknown attribute " "type=%s (%d)\n", op->o_connid, type.bv_val, err ); @@ -349,8 +349,8 @@ get_ssa( if( rc != LDAP_SUCCESS ) { Debug( LDAP_DEBUG_ANY, - "get_ssa: conn %d unknown attribute type=%s (%d)\n", - op->o_connid, desc.bv_val, rc ); + "get_ssa: conn %lu unknown attribute type=%s (%ld)\n", + op->o_connid, desc.bv_val, (long) rc ); /* skip over the rest of this filter */ for ( tag = ber_first_element( ber, &len, &last ); @@ -882,7 +882,7 @@ get_simple_vrFilter( if( err != LDAP_SUCCESS ) { /* unrecognized attribute description or other error */ Debug( LDAP_DEBUG_ANY, - "get_simple_vrFilter: conn %d unknown " + "get_simple_vrFilter: conn %lu unknown " "attribute type=%s (%d)\n", op->o_connid, type.bv_val, err ); diff --git a/servers/slapd/sasl.c b/servers/slapd/sasl.c index 10b17ca62f..ec28ea3cb3 100644 --- a/servers/slapd/sasl.c +++ b/servers/slapd/sasl.c @@ -1495,10 +1495,11 @@ int slap_sasl_getdn( Connection *conn, Operation *op, struct berval *id, assert( conn ); assert( id ); - Debug( LDAP_DEBUG_ARGS, "slap_sasl_getdn: conn %d id=%s [len=%d]\n", + Debug( LDAP_DEBUG_ARGS, "slap_sasl_getdn: conn %lu id=%s [len=%lu]\n", conn->c_connid, BER_BVISNULL( id ) ? "NULL" : ( BER_BVISEMPTY( id ) ? "" : id->bv_val ), - BER_BVISNULL( id ) ? 0 : ( BER_BVISEMPTY( id ) ? 0 : id->bv_len ) ); + BER_BVISNULL( id ) ? 0 : ( BER_BVISEMPTY( id ) ? 0 : + (unsigned long) id->bv_len ) ); if ( !op ) { op = conn->c_sasl_bindop; diff --git a/servers/slapd/sl_malloc.c b/servers/slapd/sl_malloc.c index d065c57ec9..1f6bd267f5 100644 --- a/servers/slapd/sl_malloc.c +++ b/servers/slapd/sl_malloc.c @@ -633,7 +633,7 @@ print_slheap(int level, void *ctx) Debug(level, "free list:\n", 0, 0, 0); so = LDAP_LIST_FIRST(&sh->sh_free[i-order_start]); while (so) { - Debug(level, "%x\n",so->so_ptr, 0, 0); + Debug(level, "%lx\n", (unsigned long) so->so_ptr, 0, 0); so = LDAP_LIST_NEXT(so, so_link); } } diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 118e7771b5..d84743c5c2 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -2663,7 +2663,7 @@ syncrepl_unparse( syncinfo_t *si, struct berval *bv ) bindconf_unparse( &si->si_bindconf, &bc ); ptr = buf; - ptr += sprintf( ptr, IDSTR "=%03d " PROVIDERSTR "=%s", + ptr += sprintf( ptr, IDSTR "=%03ld " PROVIDERSTR "=%s", si->si_rid, si->si_provideruri.bv_val ); if ( !BER_BVISNULL( &bc )) { ptr = lutil_strcopy( ptr, bc.bv_val ); @@ -2737,7 +2737,7 @@ syncrepl_unparse( syncinfo_t *si, struct berval *bv ) for (i=0; si->si_retryinterval[i]; i++) { if ( space ) *ptr++ = ' '; space = 1; - ptr += sprintf( ptr, "%d ", si->si_retryinterval[i] ); + ptr += sprintf( ptr, "%ld ", (long) si->si_retryinterval[i] ); if ( si->si_retrynum_init[i] == -1 ) *ptr++ = '+'; else