]> granicus.if.org Git - curl/commitdiff
fix compiler warning: variable was set but never used
authorYang Tse <yangsita@gmail.com>
Thu, 28 May 2009 16:19:03 +0000 (16:19 +0000)
committerYang Tse <yangsita@gmail.com>
Thu, 28 May 2009 16:19:03 +0000 (16:19 +0000)
lib/transfer.c

index 5b48d9e5e363fbe111d9cf15bf4833b232139753..fd5b3889ff563ec62fcb530e1a6c4ffb9b15d65e 100644 (file)
@@ -130,19 +130,22 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp)
   struct SessionHandle *data = conn->data;
   size_t buffersize = (size_t)bytes;
   int nread;
+#ifdef CURL_DOES_CONVERSIONS
   bool sending_http_headers = FALSE;
 
-  if(data->req.upload_chunky) {
-    /* if chunked Transfer-Encoding */
-    buffersize -= (8 + 2 + 2);   /* 32bit hex + CRLF + CRLF */
-    data->req.upload_fromhere += (8 + 2); /* 32bit hex + CRLF */
-  }
   if((conn->protocol&PROT_HTTP) &&
      (data->state.proto.http->sending == HTTPSEND_REQUEST)) {
     /* We're sending the HTTP request headers, not the data.
        Remember that so we don't re-translate them into garbage. */
     sending_http_headers = TRUE;
   }
+#endif
+
+  if(data->req.upload_chunky) {
+    /* if chunked Transfer-Encoding */
+    buffersize -= (8 + 2 + 2);   /* 32bit hex + CRLF + CRLF */
+    data->req.upload_fromhere += (8 + 2); /* 32bit hex + CRLF */
+  }
 
   /* this function returns a size_t, so we typecast to int to prevent warnings
      with picky compilers */