fix compiler warning
authorYang Tse <yangsita@gmail.com>
Tue, 26 Jul 2011 17:42:16 +0000 (19:42 +0200)
committerYang Tse <yangsita@gmail.com>
Tue, 26 Jul 2011 17:42:16 +0000 (19:42 +0200)
lib/curl_gssapi.h
lib/http.c
tests/libtest/lib540.c
tests/libtest/lib560.c
tests/server/fake_ntlm.c

index c5fbefe..249e864 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef HEADER_CURL_GSSAPI_H
+#define HEADER_CURL_GSSAPI_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -49,3 +51,5 @@ OM_uint32 Curl_gss_init_sec_context(
     OM_uint32 * ret_flags);
 
 #endif /* HAVE_GSSAPI */
+
+#endif /* HEADER_CURL_GSSAPI_H */
index bb4b387..6646d5e 100644 (file)
@@ -1631,7 +1631,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
   curl_off_t included_body = 0;
   const char *httpstring;
   Curl_send_buffer *req_buffer;
-  curl_off_t postsize; /* off_t type to be able to hold a large file size */
+  curl_off_t postsize = 0; /* off_t type to be able to hold a large file size */
   int seekerr = CURL_SEEKFUNC_OK;
 
   /* Always consider the DO phase done after this function call, even if there
index 6647ab3..8fb409f 100644 (file)
@@ -76,7 +76,6 @@ static int loop(CURLM *cm, const char* url, const char* userpwd,
                 struct curl_slist *headers)
 {
   CURLMsg *msg;
-  CURLMcode code;
   long L;
   int M, Q, U = -1;
   fd_set R, W, E;
@@ -87,7 +86,7 @@ static int loop(CURLM *cm, const char* url, const char* userpwd,
 
   while (U) {
 
-    code = curl_multi_perform(cm, &U);
+    (void) curl_multi_perform(cm, &U);
 
     if (U) {
       FD_ZERO(&R);
index 851d5d1..a91d863 100644 (file)
@@ -37,7 +37,6 @@ int test(char *URL)
 {
   CURL *http_handle;
   CURLM *multi_handle = NULL;
-  CURLMcode code;
   int res;
 
   int still_running; /* keep number of running handles */
@@ -63,7 +62,7 @@ int test(char *URL)
   curl_multi_add_handle(multi_handle, http_handle);
 
   /* we start some action by calling perform right away */
-  code = curl_multi_perform(multi_handle, &still_running);
+  (void) curl_multi_perform(multi_handle, &still_running);
 
   while(still_running) {
     struct timeval timeout;
@@ -98,7 +97,7 @@ int test(char *URL)
     case 0:
     default:
       /* timeout or readable/writable sockets */
-      code = curl_multi_perform(multi_handle, &still_running);
+      (void) curl_multi_perform(multi_handle, &still_running);
       break;
     }
   }
index 624ec6b..de71106 100644 (file)
  * responses with a pre-written string saved in test case test2005.
  */
 
-#include <stdio.h>
-#include <errno.h>
+#define CURL_NO_OLDIES
+
+#include "setup.h"
+
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 
+#define ENABLE_CURLX_PRINTF
 #include "curlx.h" /* from the private lib dir */
 #include "getpart.h"
 #include "util.h"
 
+/* include memdebug.h last */
+#include "memdebug.h"
+
 #ifndef DEFAULT_LOGFILE
 #define DEFAULT_LOGFILE "log/fake_ntlm.log"
 #endif