diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-10-06 23:25:35 -0700 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-10-06 23:25:35 -0700 |
commit | afb9ea93adb5805b580c343bd81cc168697d1d63 (patch) | |
tree | 5c64255b2425276c3878951cee1bfedf2a98eaec | |
parent | c1d40e7ee369e7a6b7f3ab167a50f99bfdcce29e (diff) |
Silencing some (mostly whiny) compiler warnings.
-rw-r--r-- | lib/ssl_gnutls.c | 4 | ||||
-rw-r--r-- | lib/xmltree.c | 5 | ||||
-rw-r--r-- | protocols/msn/soap.c | 5 |
3 files changed, 9 insertions, 5 deletions
diff --git a/lib/ssl_gnutls.c b/lib/ssl_gnutls.c index 4fc7c33f..6e68791d 100644 --- a/lib/ssl_gnutls.c +++ b/lib/ssl_gnutls.c @@ -188,7 +188,7 @@ int ssl_read( void *conn, char *buf, int len ) if( st == GNUTLS_E_AGAIN || st == GNUTLS_E_INTERRUPTED ) ssl_errno = SSL_AGAIN; - if( 0 && getenv( "BITLBEE_DEBUG" ) && st > 0 ) write( 1, buf, st ); + if( 0 && getenv( "BITLBEE_DEBUG" ) && st > 0 ) len = write( 1, buf, st ); return st; } @@ -209,7 +209,7 @@ int ssl_write( void *conn, const char *buf, int len ) if( st == GNUTLS_E_AGAIN || st == GNUTLS_E_INTERRUPTED ) ssl_errno = SSL_AGAIN; - if( 0 && getenv( "BITLBEE_DEBUG" ) && st > 0 ) write( 1, buf, st ); + if( 0 && getenv( "BITLBEE_DEBUG" ) && st > 0 ) len = write( 1, buf, st ); return st; } diff --git a/lib/xmltree.c b/lib/xmltree.c index bee9007f..54a7dd13 100644 --- a/lib/xmltree.c +++ b/lib/xmltree.c @@ -614,7 +614,10 @@ void xt_add_child( struct xt_node *parent, struct xt_node *child ) /* Same, but at the beginning. */ void xt_insert_child( struct xt_node *parent, struct xt_node *child ) { - struct xt_node *node, *last; + struct xt_node *node, *last = NULL; + + if( child == NULL ) + return; /* BUG */ for( node = child; node; node = node->next ) { diff --git a/protocols/msn/soap.c b/protocols/msn/soap.c index e289de69..ad3eb750 100644 --- a/protocols/msn/soap.c +++ b/protocols/msn/soap.c @@ -209,14 +209,15 @@ static char *msn_soap_abservice_build( const char *body_fmt, const char *scenari static void msn_soap_debug_print( const char *headers, const char *payload ) { char *s; + int st; if( !getenv( "BITLBEE_DEBUG" ) ) return; if( ( s = strstr( headers, "\r\n\r\n" ) ) ) - write( 1, s, s - headers + 4 ); + st = write( 1, s, s - headers + 4 ); else - write( 1, headers, strlen( headers ) ); + st = write( 1, headers, strlen( headers ) ); #ifdef DEBUG { |