Silence stupid warnings

This commit is contained in:
Howard Chu 2020-09-16 23:27:45 +01:00
parent 947b8ed9d6
commit 3e181b8453
2 changed files with 9 additions and 9 deletions

View File

@ -107,7 +107,7 @@ static int emfile;
static volatile int waking;
#define WAKE_LISTENER(l,w) do { \
if (w) { \
tcp_write( SLAP_FD2SOCK(wake_sds[l][1]), "0", 1 ); \
(void)!tcp_write( SLAP_FD2SOCK(wake_sds[l][1]), "0", 1 ); \
} \
} while (0)
@ -2137,7 +2137,7 @@ slap_sockaddrstr( Sockaddr *sa, struct berval *addrbuf )
strcpy(addrbuf->bv_val, "IP=");
if ( IN6_IS_ADDR_V4MAPPED(&sa->sa_in6_addr.sin6_addr) ) {
#if defined( HAVE_GETADDRINFO ) && defined( HAVE_INET_NTOP )
addr = inet_ntop( AF_INET,
addr = (char *)inet_ntop( AF_INET,
((struct in_addr *)&sa->sa_in6_addr.sin6_addr.s6_addr[12]),
addrbuf->bv_val+3, addrbuf->bv_len-3 );
#else /* ! HAVE_GETADDRINFO || ! HAVE_INET_NTOP */
@ -2154,7 +2154,7 @@ slap_sockaddrstr( Sockaddr *sa, struct berval *addrbuf )
(unsigned) ntohs( sa->sa_in6_addr.sin6_port ) ) + len + 3;
}
} else {
addr = inet_ntop( AF_INET6,
addr = (char *)inet_ntop( AF_INET6,
&sa->sa_in6_addr.sin6_addr,
addrbuf->bv_val+4, addrbuf->bv_len-4 );
if ( !addr ) addr = SLAP_STRING_UNKNOWN;
@ -2173,7 +2173,7 @@ slap_sockaddrstr( Sockaddr *sa, struct berval *addrbuf )
case AF_INET:
strcpy(addrbuf->bv_val, "IP=");
#if defined( HAVE_GETADDRINFO ) && defined( HAVE_INET_NTOP )
addr = inet_ntop( AF_INET, &sa->sa_in_addr.sin_addr,
addr = (char *)inet_ntop( AF_INET, &sa->sa_in_addr.sin_addr,
addrbuf->bv_val+3, addrbuf->bv_len-3 );
#else /* ! HAVE_GETADDRINFO || ! HAVE_INET_NTOP */
addr = inet_ntoa( sa->sa_in_addr.sin_addr );
@ -3130,7 +3130,7 @@ loop:
if ( fd == wake_sds[tid][0] ) {
char c[BUFSIZ];
waking = 0;
tcp_read( SLAP_FD2SOCK(wake_sds[tid][0]), c, sizeof(c) );
(void)!tcp_read( SLAP_FD2SOCK(wake_sds[tid][0]), c, sizeof(c) );
continue;
}

View File

@ -2994,8 +2994,8 @@ syncrepl_message_to_op(
op->o_callback = &cb;
slap_op_time( &op->o_time, &op->o_tincr );
Debug( LDAP_DEBUG_SYNC, "syncrepl_message_to_op: %s tid %x\n",
si->si_ridtxt, op->o_tid );
Debug( LDAP_DEBUG_SYNC, "syncrepl_message_to_op: %s tid %p\n",
si->si_ridtxt, (void *)op->o_tid );
switch( op->o_tag ) {
case LDAP_REQ_ADD:
@ -3884,8 +3884,8 @@ syncrepl_entry(
int freecsn = 1;
Debug( LDAP_DEBUG_SYNC,
"syncrepl_entry: %s LDAP_RES_SEARCH_ENTRY(LDAP_SYNC_%s) csn=%s tid %x\n",
si->si_ridtxt, syncrepl_state2str( syncstate ), syncCSN ? syncCSN->bv_val : "(none)", op->o_tid );
"syncrepl_entry: %s LDAP_RES_SEARCH_ENTRY(LDAP_SYNC_%s) csn=%s tid %p\n",
si->si_ridtxt, syncrepl_state2str( syncstate ), syncCSN ? syncCSN->bv_val : "(none)", (void *)op->o_tid );
if (( syncstate == LDAP_SYNC_PRESENT || syncstate == LDAP_SYNC_ADD ) ) {
if ( !si->si_refreshPresent && !si->si_refreshDone ) {