mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-17 14:00:30 +08:00
silence warnings...
This commit is contained in:
parent
1bf816e425
commit
af23be3675
@ -747,7 +747,7 @@ tool_args( int argc, char **argv )
|
||||
}
|
||||
|
||||
ldap_memfree( api.ldapai_vendor_name );
|
||||
ldap_value_free( api.ldapai_extensions );
|
||||
ber_memvfree( (void **)api.ldapai_extensions );
|
||||
}
|
||||
|
||||
if (protocol == -1)
|
||||
|
@ -604,7 +604,7 @@ ldap_dump_connection( LDAP *ld, LDAPConn *lconns, int all )
|
||||
LDAPConn *lc;
|
||||
char timebuf[32];
|
||||
|
||||
fprintf( stderr, "** ld %p Connection%s:\n", ld, all ? "s" : "" );
|
||||
fprintf( stderr, "** ld %p Connection%s:\n", (void *)ld, all ? "s" : "" );
|
||||
for ( lc = lconns; lc != NULL; lc = lc->lconn_next ) {
|
||||
if ( lc->lconn_server != NULL ) {
|
||||
fprintf( stderr, "* host: %s port: %d%s\n",
|
||||
@ -651,7 +651,7 @@ ldap_dump_requests_and_responses( LDAP *ld )
|
||||
#ifdef LDAP_R_COMPILE
|
||||
ldap_pvt_thread_mutex_lock( &ld->ld_req_mutex );
|
||||
#endif
|
||||
fprintf( stderr, "** ld %p Outstanding Requests:\n", ld );
|
||||
fprintf( stderr, "** ld %p Outstanding Requests:\n", (void *)ld );
|
||||
if (( lr = ld->ld_requests ) == NULL ) {
|
||||
fprintf( stderr, " Empty\n" );
|
||||
}
|
||||
@ -669,7 +669,7 @@ ldap_dump_requests_and_responses( LDAP *ld )
|
||||
#ifdef LDAP_R_COMPILE
|
||||
ldap_pvt_thread_mutex_unlock( &ld->ld_req_mutex );
|
||||
#endif
|
||||
fprintf( stderr, "** ld %p Response Queue:\n", ld );
|
||||
fprintf( stderr, "** ld %p Response Queue:\n", (void *)ld );
|
||||
if (( lm = ld->ld_responses ) == NULL ) {
|
||||
fprintf( stderr, " Empty\n" );
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ ldap_result(
|
||||
assert( ld != NULL );
|
||||
assert( result != NULL );
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "ldap_result ld %p msgid %d\n", ld, msgid, 0 );
|
||||
Debug( LDAP_DEBUG_TRACE, "ldap_result ld %p msgid %d\n", (void *)ld, msgid, 0 );
|
||||
|
||||
#ifdef LDAP_R_COMPILE
|
||||
ldap_pvt_thread_mutex_lock( &ld->ld_res_mutex );
|
||||
@ -147,7 +147,7 @@ chkResponseList(
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
"ldap_chkResponseList ld %p msgid %d all %d\n",
|
||||
ld, msgid, all );
|
||||
(void *)ld, msgid, all );
|
||||
lastlm = &ld->ld_responses;
|
||||
for ( lm = ld->ld_responses; lm != NULL; lm = nextlm ) {
|
||||
nextlm = lm->lm_next;
|
||||
@ -207,11 +207,11 @@ chkResponseList(
|
||||
#ifdef LDAP_DEBUG
|
||||
if( lm == NULL) {
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
"ldap_chkResponseList returns ld %p NULL\n", ld, 0, 0);
|
||||
"ldap_chkResponseList returns ld %p NULL\n", (void *)ld, 0, 0);
|
||||
} else {
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
"ldap_chkResponseList returns ld %p msgid %d, type 0x%02lu\n",
|
||||
ld, lm->lm_msgid, (unsigned long) lm->lm_msgtype);
|
||||
(void *)ld, lm->lm_msgid, (unsigned long) lm->lm_msgtype);
|
||||
}
|
||||
#endif
|
||||
return lm;
|
||||
@ -239,10 +239,10 @@ wait4msg(
|
||||
#ifdef LDAP_DEBUG
|
||||
if ( timeout == NULL ) {
|
||||
Debug( LDAP_DEBUG_TRACE, "wait4msg ld %p msgid %d (infinite timeout)\n",
|
||||
ld, msgid, 0 );
|
||||
(void *)ld, msgid, 0 );
|
||||
} else {
|
||||
Debug( LDAP_DEBUG_TRACE, "wait4msg ld %p msgid %d (timeout %ld usec)\n",
|
||||
ld, msgid, (long)timeout->tv_sec * 1000000 + timeout->tv_usec );
|
||||
(void *)ld, msgid, (long)timeout->tv_sec * 1000000 + timeout->tv_usec );
|
||||
}
|
||||
#endif /* LDAP_DEBUG */
|
||||
|
||||
@ -260,7 +260,7 @@ wait4msg(
|
||||
#ifdef LDAP_DEBUG
|
||||
if ( ldap_debug & LDAP_DEBUG_TRACE ) {
|
||||
Debug( LDAP_DEBUG_TRACE, "wait4msg continue ld %p msgid %d all %d\n",
|
||||
ld, msgid, all );
|
||||
(void *)ld, msgid, all );
|
||||
ldap_dump_connection( ld, ld->ld_conns, 1 );
|
||||
ldap_dump_requests_and_responses( ld );
|
||||
}
|
||||
@ -368,7 +368,7 @@ wait4msg(
|
||||
tv.tv_sec = tv0.tv_sec;
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "wait4msg ld %p %ld secs to go\n",
|
||||
ld, (long) tv.tv_sec, 0 );
|
||||
(void *)ld, (long) tv.tv_sec, 0 );
|
||||
start_time = tmp_time;
|
||||
}
|
||||
}
|
||||
@ -417,7 +417,8 @@ try_read1msg(
|
||||
assert( lcp != NULL );
|
||||
assert( *lcp != NULL );
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "read1msg: ld %p msgid %d all %d\n", ld, msgid, all );
|
||||
Debug( LDAP_DEBUG_TRACE, "read1msg: ld %p msgid %d all %d\n",
|
||||
(void *)ld, msgid, all );
|
||||
|
||||
lc = *lcp;
|
||||
|
||||
@ -455,7 +456,7 @@ nextresp3:
|
||||
if ( tag == LBER_DEFAULT) {
|
||||
#ifdef LDAP_DEBUG
|
||||
Debug( LDAP_DEBUG_CONNS,
|
||||
"ber_get_next failed.\n", 0, 0, 0 );
|
||||
"ber_get_next failed.\n", 0, 0, 0 );
|
||||
#endif
|
||||
#ifdef EWOULDBLOCK
|
||||
if (errno==EWOULDBLOCK) return -2;
|
||||
@ -480,7 +481,7 @@ nextresp3:
|
||||
/* if it's been abandoned, toss it */
|
||||
if ( ldap_abandoned( ld, id ) ) {
|
||||
Debug( LDAP_DEBUG_ANY, "abandoned ld %p msgid %ld\n",
|
||||
ld, (long) id, 0);
|
||||
(void *)ld, (long) id, 0);
|
||||
retry_ber:
|
||||
ber_free( ber, 1 );
|
||||
if ( ber_sockbuf_ctrl( sb, LBER_SB_OPT_DATA_READY, NULL ) ) {
|
||||
@ -492,8 +493,8 @@ retry_ber:
|
||||
lr = ldap_find_request_by_msgid( ld, id );
|
||||
if ( lr == NULL ) {
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"no request for response on ld %p msgid %ld (tossing)\n",
|
||||
ld, (long) id, 0 );
|
||||
"no request for response on ld %p msgid %ld (tossing)\n",
|
||||
(void *)ld, (long) id, 0 );
|
||||
goto retry_ber;
|
||||
}
|
||||
#ifdef LDAP_CONNECTIONLESS
|
||||
@ -511,7 +512,7 @@ nextresp2:
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
"read1msg: ld %p msgid %ld message type %s\n",
|
||||
ld, (long) lr->lr_msgid, ldap_int_msgtype2str( tag ));
|
||||
(void *)ld, (long) lr->lr_msgid, ldap_int_msgtype2str( tag ));
|
||||
|
||||
id = lr->lr_origid;
|
||||
refer_cnt = 0;
|
||||
@ -609,8 +610,8 @@ nextresp2:
|
||||
rc = LDAP_DECODING_ERROR;
|
||||
lr->lr_status = LDAP_REQST_COMPLETED;
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
"read1msg: referral decode error, mark request completed, ld %p msgid %d\n",
|
||||
ld, lr->lr_msgid, 0);
|
||||
"read1msg: referral decode error, mark request completed, ld %p msgid %d\n",
|
||||
(void *)ld, lr->lr_msgid, 0);
|
||||
} else {
|
||||
/* Chase the referral
|
||||
* Note: refs arrary is freed by ldap_chase_v3referrals
|
||||
@ -619,8 +620,8 @@ nextresp2:
|
||||
0, &lr->lr_res_error, &hadref );
|
||||
lr->lr_status = LDAP_REQST_COMPLETED;
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
"read1msg: referral chased, mark request completed, ld %p msgid %d\n",
|
||||
ld, lr->lr_msgid, 0);
|
||||
"read1msg: referral chased, mark request completed, ld %p msgid %d\n",
|
||||
(void *)ld, lr->lr_msgid, 0);
|
||||
if( refer_cnt > 0) {
|
||||
/* Referral successfully chased */
|
||||
v3ref = V3REF_SUCCESS;
|
||||
@ -742,7 +743,8 @@ nextresp2:
|
||||
}
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
"read1msg: ld %p %d new referrals\n", ld, refer_cnt, 0 );
|
||||
"read1msg: ld %p %d new referrals\n",
|
||||
(void *)ld, refer_cnt, 0 );
|
||||
|
||||
if ( refer_cnt != 0 ) { /* chasing referrals */
|
||||
ber_free( ber, 1 );
|
||||
@ -763,7 +765,8 @@ nextresp2:
|
||||
|
||||
lr->lr_status = LDAP_REQST_COMPLETED; /* declare this request done */
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
"read1msg: mark request completed, ld %p msgid %d\n", ld, lr->lr_msgid, 0);
|
||||
"read1msg: mark request completed, ld %p msgid %d\n",
|
||||
(void *)ld, lr->lr_msgid, 0);
|
||||
while ( lr->lr_parent != NULL ) {
|
||||
merge_error_info( ld, lr->lr_parent, lr );
|
||||
|
||||
@ -791,7 +794,7 @@ nextresp2:
|
||||
id = lr->lr_msgid;
|
||||
tag = lr->lr_res_msgtype;
|
||||
Debug( LDAP_DEBUG_ANY, "request done: ld %p msgid %ld\n",
|
||||
ld, (long) id, 0 );
|
||||
(void *)ld, (long) id, 0 );
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
"res_errno: %d, res_error: <%s>, res_matched: <%s>\n",
|
||||
lr->lr_res_errno, lr->lr_res_error ? lr->lr_res_error : "",
|
||||
@ -963,7 +966,7 @@ lr->lr_res_matched ? lr->lr_res_matched : "" );
|
||||
}
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "adding response ld %p msgid %ld type %ld:\n",
|
||||
ld, (long) newmsg->lm_msgid, (long) newmsg->lm_msgtype );
|
||||
(void *)ld, (long) newmsg->lm_msgid, (long) newmsg->lm_msgtype );
|
||||
|
||||
/* part of a search response - add to end of list of entries */
|
||||
l->lm_chain_tail->lm_chain = newmsg;
|
||||
|
@ -402,7 +402,7 @@ ldap_bv2escaped_filter_value( struct berval *in, struct berval *out )
|
||||
|
||||
for( i=0; i<in->bv_len; i++ ) {
|
||||
char c = in->bv_val[ i ];
|
||||
if (c & 0x80 || escape[ c ]) {
|
||||
if (c & 0x80 || escape[ (unsigned)c ]) {
|
||||
out->bv_val[out->bv_len++] = '\\';
|
||||
out->bv_val[out->bv_len++] = "0123456789ABCDEF"[0x0f & (c>>4)];
|
||||
out->bv_val[out->bv_len++] = "0123456789ABCDEF"[0x0f & c];
|
||||
|
@ -759,6 +759,7 @@ error_return:;
|
||||
}
|
||||
|
||||
#ifdef LDAP_DEBUG
|
||||
#ifdef SLAPD_UNUSED
|
||||
static int
|
||||
at_index_printnode( void *v_air, void *ignore )
|
||||
{
|
||||
@ -776,6 +777,7 @@ at_index_print( void )
|
||||
(void) avl_apply( attr_index, at_index_printnode, 0, -1, AVL_INORDER );
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void
|
||||
at_unparse( BerVarray *res, AttributeType *start, AttributeType *end, int sys )
|
||||
|
@ -32,8 +32,10 @@
|
||||
|
||||
static int bdb_cache_delete_internal(Cache *cache, EntryInfo *e, int decr);
|
||||
#ifdef LDAP_DEBUG
|
||||
#ifdef SLAPD_UNUSED
|
||||
static void bdb_lru_print(Cache *cache);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static EntryInfo *
|
||||
bdb_cache_entryinfo_new( Cache *cache )
|
||||
@ -1223,6 +1225,7 @@ bdb_cache_release_all( Cache *cache )
|
||||
}
|
||||
|
||||
#ifdef LDAP_DEBUG
|
||||
#ifdef SLAPD_UNUSED
|
||||
static void
|
||||
bdb_lru_print( Cache *cache )
|
||||
{
|
||||
@ -1240,6 +1243,7 @@ bdb_lru_print( Cache *cache )
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef BDB_REUSE_LOCKERS
|
||||
static void
|
||||
|
@ -48,8 +48,10 @@ typedef struct ldbm_entry_info {
|
||||
|
||||
static int cache_delete_entry_internal(Cache *cache, Entry *e);
|
||||
#ifdef LDAP_DEBUG
|
||||
#ifdef SLAPD_UNUSED
|
||||
static void lru_print(Cache *cache);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static int
|
||||
cache_entry_private_init( Entry*e )
|
||||
@ -652,6 +654,7 @@ cache_release_all( Cache *cache )
|
||||
}
|
||||
|
||||
#ifdef LDAP_DEBUG
|
||||
#ifdef SLAPD_UNUSED
|
||||
static void
|
||||
lru_print( Cache *cache )
|
||||
{
|
||||
@ -669,3 +672,4 @@ lru_print( Cache *cache )
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -283,8 +283,15 @@ retry:;
|
||||
rs->sr_err = ldap_parse_extended_result( msc->msc_ld, res,
|
||||
NULL, &data, 0 );
|
||||
if ( rs->sr_err == LDAP_SUCCESS ) {
|
||||
rs->sr_err = ldap_result2error( msc->msc_ld, res, 1 );
|
||||
int err;
|
||||
|
||||
rs->sr_err = ldap_parse_result( msc->msc_ld, res,
|
||||
&err, NULL, NULL, NULL, NULL, 1 );
|
||||
res = NULL;
|
||||
|
||||
if ( rs->sr_err == LDAP_SUCCESS ) {
|
||||
rs->sr_err = err;
|
||||
}
|
||||
|
||||
/* FIXME: in case a referral
|
||||
* is returned, should we try
|
||||
|
@ -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: %lu\n", count, 0, 0 );
|
||||
"number of values in query: %u\n", count, 0, 0 );
|
||||
SQLFreeStmt( sth, SQL_DROP );
|
||||
if ( count == 0 ) {
|
||||
return 1;
|
||||
|
@ -434,7 +434,7 @@ backsql_free_db_conn( Operation *op )
|
||||
if ( conn != NULL ) {
|
||||
Debug( LDAP_DEBUG_TRACE, "backsql_free_db_conn(): "
|
||||
"closing db connection %lu (%p)\n",
|
||||
op->o_connid, conn, 0 );
|
||||
op->o_connid, (void *)conn, 0 );
|
||||
backsql_close_db_conn( (void *)conn );
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,9 @@
|
||||
#include "slap.h"
|
||||
|
||||
static struct slab_object * slap_replenish_sopool(struct slab_heap* sh);
|
||||
#ifdef SLAPD_UNUSED
|
||||
static void print_slheap(int level, void *ctx);
|
||||
#endif
|
||||
|
||||
void
|
||||
slap_sl_mem_destroy(
|
||||
@ -598,6 +600,7 @@ slap_replenish_sopool(
|
||||
return so_block;
|
||||
}
|
||||
|
||||
#ifdef SLAPD_UNUSED
|
||||
static void
|
||||
print_slheap(int level, void *ctx)
|
||||
{
|
||||
@ -638,3 +641,4 @@ print_slheap(int level, void *ctx)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -61,7 +61,9 @@ static LDAPMod *alloc_ldapmod LDAP_P(( void ));
|
||||
static void free_ldapmod LDAP_P(( LDAPMod * ));
|
||||
static void free_ldmarr LDAP_P(( LDAPMod ** ));
|
||||
static int getmodtype LDAP_P(( char * ));
|
||||
#ifdef SLAPD_UNUSED
|
||||
static void dump_ldm_array LDAP_P(( LDAPMod ** ));
|
||||
#endif
|
||||
static int do_bind LDAP_P(( Ri *, int * ));
|
||||
static int do_unbind LDAP_P(( Ri * ));
|
||||
|
||||
@ -877,6 +879,7 @@ retry:
|
||||
/*
|
||||
* For debugging. Print the contents of an ldmarr array.
|
||||
*/
|
||||
#ifdef SLAPD_UNUSED
|
||||
static void
|
||||
dump_ldm_array(
|
||||
LDAPMod **ldmarr
|
||||
@ -910,3 +913,4 @@ dump_ldm_array(
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -158,7 +158,7 @@ Ri_process(
|
||||
rq->rq_unlock( rq );
|
||||
if ( sglob->slurpd_shutdown ) {
|
||||
if ( ri->ri_ldp ) {
|
||||
ldap_unbind( ri->ri_ldp );
|
||||
ldap_unbind_ext( ri->ri_ldp, NULL, NULL );
|
||||
ri->ri_ldp = NULL;
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user