From 7f9d71e6ff319920ea22b8102592dd29af3b49a8 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 21 Oct 2008 03:57:56 +0000 Subject: [PATCH] silence a couple of minor warnings from sparse/cgcc --- gtk/blocklist.c | 9 +++++---- libtransmission/rpc-server.c | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/gtk/blocklist.c b/gtk/blocklist.c index 21336d29e..cf1055df6 100644 --- a/gtk/blocklist.c +++ b/gtk/blocklist.c @@ -104,13 +104,14 @@ blocklistThreadFunc( gpointer gcore ) if( ok ) { + long verbose = getenv( "TR_CURL_VERBOSE" ) == NULL ? 0L : 1L; + CURL * curl = curl_easy_init( ); curl_easy_setopt( curl, CURLOPT_URL, url ); curl_easy_setopt( curl, CURLOPT_ENCODING, "deflate" ); - curl_easy_setopt( curl, CURLOPT_USERAGENT, - "Transmission/" LONG_VERSION_STRING ); - curl_easy_setopt( curl, CURLOPT_VERBOSE, getenv( - "TR_CURL_VERBOSE" ) != NULL ); + curl_easy_setopt( curl, CURLOPT_USERAGENT, "Transmission/" + LONG_VERSION_STRING ); + curl_easy_setopt( curl, CURLOPT_VERBOSE, verbose ); curl_easy_setopt( curl, CURLOPT_WRITEFUNCTION, writeFunc ); curl_easy_setopt( curl, CURLOPT_WRITEDATA, &fd ); curl_easy_setopt( curl, CURLOPT_NOPROGRESS, 1 ); diff --git a/libtransmission/rpc-server.c b/libtransmission/rpc-server.c index 7b1f476d5..9962db0d6 100644 --- a/libtransmission/rpc-server.c +++ b/libtransmission/rpc-server.c @@ -235,9 +235,9 @@ add_response( struct evhttp_request * req, int state; z_stream stream; - stream.zalloc = Z_NULL; - stream.zfree = Z_NULL; - stream.opaque = Z_NULL; + stream.zalloc = (alloc_func) Z_NULL; + stream.zfree = (free_func) Z_NULL; + stream.opaque = (voidpf) Z_NULL; deflateInit( &stream, Z_BEST_COMPRESSION ); stream.next_in = (Bytef*) content;