diff --git a/libtransmission/ConvertUTF.c b/libtransmission/ConvertUTF.c index 66f6990f1..0e8c8569c 100644 --- a/libtransmission/ConvertUTF.c +++ b/libtransmission/ConvertUTF.c @@ -353,7 +353,7 @@ Boolean tr_utf8_validate( const char * str, int max_len, const char ** end ) { const UTF8* source = (const UTF8*) str; - const UTF8* sourceEnd = source; + const UTF8* sourceEnd; if( max_len == 0 ) return true; diff --git a/libtransmission/net.c b/libtransmission/net.c index a3dde5fb7..a1f798a07 100644 --- a/libtransmission/net.c +++ b/libtransmission/net.c @@ -530,7 +530,6 @@ tr_netBindTCP( const tr_address * addr, tr_port port, tr_bool suppressMsgs ) struct sockaddr_storage sock; const int type = SOCK_STREAM; int addrlen; - int retval; #if defined( SO_REUSEADDR ) || defined( SO_REUSEPORT ) || defined( IPV6_V6ONLY ) int optval = 1; @@ -548,8 +547,8 @@ tr_netBindTCP( const tr_address * addr, tr_port port, tr_bool suppressMsgs ) #ifdef IPV6_V6ONLY if( addr->type == TR_AF_INET6 && - ( retval = setsockopt( s, IPPROTO_IPV6, IPV6_V6ONLY, &optval, - sizeof( optval ) ) ) == -1 ) { + setsockopt( s, IPPROTO_IPV6, IPV6_V6ONLY, &optval, + sizeof( optval ) ) == -1 ) { /* the kernel may not support this. if not, ignore it */ if( errno != ENOPROTOOPT ) return -errno; diff --git a/libtransmission/web.c b/libtransmission/web.c index 0730a3063..21e3b09a3 100644 --- a/libtransmission/web.c +++ b/libtransmission/web.c @@ -84,7 +84,7 @@ struct tr_web static struct tr_web_sockinfo * getSockinfo( tr_web * web, int fd, tr_bool createIfMissing ) { - tr_list * l = web->fds; + tr_list * l; for( l=web->fds; l!=NULL; l=l->next ) { struct tr_web_sockinfo * s = l->data;