From 7cb866642def4ff6ae39c20f2b658a9fd82c253f Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Thu, 2 Sep 1999 08:11:54 +0000 Subject: [PATCH] Fix Debug printf format --- servers/slapd/abandon.c | 2 +- servers/slapd/attr.c | 4 ++-- servers/slapd/back-ldbm/modrdn.c | 2 +- servers/slapd/back-shell/abandon.c | 4 ++-- servers/slapd/operation.c | 2 +- servers/slapd/schema.c | 12 ++++++------ servers/slapd/user.c | 8 ++++---- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/servers/slapd/abandon.c b/servers/slapd/abandon.c index 0d31209148..359811e94a 100644 --- a/servers/slapd/abandon.c +++ b/servers/slapd/abandon.c @@ -99,7 +99,7 @@ done: ldap_pvt_thread_mutex_unlock( &conn->c_mutex ); Debug( LDAP_DEBUG_TRACE, "do_abandon: op=%ld %sfound\n", - id, notfound ? "not " : "", 0 ); + (long) id, notfound ? "not " : "", 0 ); return LDAP_SUCCESS; } diff --git a/servers/slapd/attr.c b/servers/slapd/attr.c index 2ebf99a013..c541da91e5 100644 --- a/servers/slapd/attr.c +++ b/servers/slapd/attr.c @@ -696,8 +696,8 @@ at_schema_info( Entry *e ) val.bv_val = ldap_attributetype2str( &at->sat_atype ); if ( val.bv_val ) { val.bv_len = strlen( val.bv_val ); - Debug( LDAP_DEBUG_TRACE, "Merging at [%d] %s\n", - val.bv_len, val.bv_val, 0 ); + Debug( LDAP_DEBUG_TRACE, "Merging at [%ld] %s\n", + (long) val.bv_len, val.bv_val, 0 ); attr_merge( e, "attributeTypes", vals ); ldap_memfree( val.bv_val ); } else { diff --git a/servers/slapd/back-ldbm/modrdn.c b/servers/slapd/back-ldbm/modrdn.c index a2262c63b9..2d00436cda 100644 --- a/servers/slapd/back-ldbm/modrdn.c +++ b/servers/slapd/back-ldbm/modrdn.c @@ -205,7 +205,7 @@ ldbm_back_modrdn( } Debug( LDAP_DEBUG_TRACE, - "ldbm_back_modrdn: wr to new parent OK np=%p, id=%d\n", + "ldbm_back_modrdn: wr to new parent OK np=%p, id=%ld\n", np, np->e_id, 0 ); /* check newSuperior for "children" acl */ diff --git a/servers/slapd/back-shell/abandon.c b/servers/slapd/back-shell/abandon.c index e1ea263873..da497ab477 100644 --- a/servers/slapd/back-shell/abandon.c +++ b/servers/slapd/back-shell/abandon.c @@ -45,8 +45,8 @@ shell_back_abandon( ldap_pvt_thread_mutex_unlock( &conn->c_mutex ); if ( pid != -1 ) { - Debug( LDAP_DEBUG_ARGS, "shell killing pid %d\n", pid, - 0, 0 ); + Debug( LDAP_DEBUG_ARGS, "shell killing pid %d\n", + (int) pid, 0, 0 ); kill( pid, SIGTERM ); } else { Debug( LDAP_DEBUG_ARGS, "shell could not find op %d\n", diff --git a/servers/slapd/operation.c b/servers/slapd/operation.c index a4401bced5..01f9d12f5f 100644 --- a/servers/slapd/operation.c +++ b/servers/slapd/operation.c @@ -96,7 +96,7 @@ slap_op_remove( Operation **olist, Operation *op ) if ( *tmp == NULL ) { Debug( LDAP_DEBUG_ANY, "op_delete: can't find op %ld\n", - op->o_msgid, 0, 0 ); + (long) op->o_msgid, 0, 0 ); return -1; } diff --git a/servers/slapd/schema.c b/servers/slapd/schema.c index 51002f91f4..7ee54a2e64 100644 --- a/servers/slapd/schema.c +++ b/servers/slapd/schema.c @@ -1067,8 +1067,8 @@ syn_schema_info( Entry *e ) val.bv_val = ldap_syntax2str( &syn->ssyn_syn ); if ( val.bv_val ) { val.bv_len = strlen( val.bv_val ); - Debug( LDAP_DEBUG_TRACE, "Merging syn [%d] %s\n", - val.bv_len, val.bv_val, 0 ); + Debug( LDAP_DEBUG_TRACE, "Merging syn [%ld] %s\n", + (long) val.bv_len, val.bv_val, 0 ); attr_merge( e, "ldapSyntaxes", vals ); ldap_memfree( val.bv_val ); } else { @@ -1092,8 +1092,8 @@ mr_schema_info( Entry *e ) val.bv_val = ldap_matchingrule2str( &mr->smr_mrule ); if ( val.bv_val ) { val.bv_len = strlen( val.bv_val ); - Debug( LDAP_DEBUG_TRACE, "Merging mr [%d] %s\n", - val.bv_len, val.bv_val, 0 ); + Debug( LDAP_DEBUG_TRACE, "Merging mr [%ld] %s\n", + (long) val.bv_len, val.bv_val, 0 ); attr_merge( e, "matchingRules", vals ); ldap_memfree( val.bv_val ); } else { @@ -1117,8 +1117,8 @@ oc_schema_info( Entry *e ) val.bv_val = ldap_objectclass2str( &oc->soc_oclass ); if ( val.bv_val ) { val.bv_len = strlen( val.bv_val ); - Debug( LDAP_DEBUG_TRACE, "Merging oc [%d] %s\n", - val.bv_len, val.bv_val, 0 ); + Debug( LDAP_DEBUG_TRACE, "Merging oc [%ld] %s\n", + (long) val.bv_len, val.bv_val, 0 ); attr_merge( e, "objectClasses", vals ); ldap_memfree( val.bv_val ); } else { diff --git a/servers/slapd/user.c b/servers/slapd/user.c index 2613fbcfa4..ce2b0050e9 100644 --- a/servers/slapd/user.c +++ b/servers/slapd/user.c @@ -120,13 +120,13 @@ slap_init_user( char *user, char *group ) if ( got_gid ) { if ( setgid( gid ) != 0 ) { Debug( LDAP_DEBUG_ANY, "Could not set real group id to %d\n", - gid, 0, 0 ); + (int) gid, 0, 0 ); exit( EXIT_FAILURE ); } #ifdef HAVE_SETEGID if ( setegid( gid ) != 0 ) { Debug( LDAP_DEBUG_ANY, "Could not set effective group id to %d\n", - gid, 0, 0 ); + (int) gid, 0, 0 ); exit( EXIT_FAILURE ); } #endif @@ -135,13 +135,13 @@ slap_init_user( char *user, char *group ) if ( got_uid ) { if ( setuid( uid ) != 0 ) { Debug( LDAP_DEBUG_ANY, "Could not set real user id to %d\n", - uid, 0, 0 ); + (int) uid, 0, 0 ); exit( EXIT_FAILURE ); } #ifdef HAVE_SETEUID if ( seteuid( uid ) != 0 ) { Debug( LDAP_DEBUG_ANY, "Could not set effective user id to %d\n", - uid, 0, 0 ); + (int) uid, 0, 0 ); exit( EXIT_FAILURE ); } #endif -- 2.39.5