]> granicus.if.org Git - transmission/commitdiff
silence a couple of minor warnings from sparse/cgcc
authorCharles Kerr <charles@transmissionbt.com>
Tue, 21 Oct 2008 03:57:56 +0000 (03:57 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Tue, 21 Oct 2008 03:57:56 +0000 (03:57 +0000)
gtk/blocklist.c
libtransmission/rpc-server.c

index 21336d29e795839937ec0bb8896731844137e8a4..cf1055df6290d43e9040ad010566bea9b8ef8033 100644 (file)
@@ -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 );
index 7b1f476d5cee7076bad2110d7d8a651dd57f8fa2..9962db0d6831fa2759442405847f3976c4cf0256 100644 (file)
@@ -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;