]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Silence stupid warnings
authorHoward Chu <hyc@openldap.org>
Wed, 16 Sep 2020 22:27:45 +0000 (23:27 +0100)
committerHoward Chu <hyc@openldap.org>
Wed, 16 Sep 2020 22:27:45 +0000 (23:27 +0100)
servers/slapd/daemon.c
servers/slapd/syncrepl.c

index dc132754c65a859f5c9b49fe711aab35869cb9b6..92f66dfcd12ee94f6507d9970233a14c63bba7ab 100644 (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;
                                }
 
index 598ad16c5bdd2d248cda28c2921d92432b9f149e..5c534f7bc305f06fff267fc57aa5d6dd4c389cd5 100644 (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 ) {