1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-13 13:05:03 -05:00

fix compiler warning

This commit is contained in:
Yang Tse 2011-07-26 19:42:16 +02:00
parent f1586cb477
commit 78bbd0eecf
5 changed files with 19 additions and 9 deletions

View File

@ -1,3 +1,5 @@
#ifndef HEADER_CURL_GSSAPI_H
#define HEADER_CURL_GSSAPI_H
/*************************************************************************** /***************************************************************************
* _ _ ____ _ * _ _ ____ _
* Project ___| | | | _ \| | * Project ___| | | | _ \| |
@ -49,3 +51,5 @@ OM_uint32 Curl_gss_init_sec_context(
OM_uint32 * ret_flags); OM_uint32 * ret_flags);
#endif /* HAVE_GSSAPI */ #endif /* HAVE_GSSAPI */
#endif /* HEADER_CURL_GSSAPI_H */

View File

@ -1631,7 +1631,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
curl_off_t included_body = 0; curl_off_t included_body = 0;
const char *httpstring; const char *httpstring;
Curl_send_buffer *req_buffer; 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; int seekerr = CURL_SEEKFUNC_OK;
/* Always consider the DO phase done after this function call, even if there /* Always consider the DO phase done after this function call, even if there

View File

@ -76,7 +76,6 @@ static int loop(CURLM *cm, const char* url, const char* userpwd,
struct curl_slist *headers) struct curl_slist *headers)
{ {
CURLMsg *msg; CURLMsg *msg;
CURLMcode code;
long L; long L;
int M, Q, U = -1; int M, Q, U = -1;
fd_set R, W, E; fd_set R, W, E;
@ -87,7 +86,7 @@ static int loop(CURLM *cm, const char* url, const char* userpwd,
while (U) { while (U) {
code = curl_multi_perform(cm, &U); (void) curl_multi_perform(cm, &U);
if (U) { if (U) {
FD_ZERO(&R); FD_ZERO(&R);

View File

@ -37,7 +37,6 @@ int test(char *URL)
{ {
CURL *http_handle; CURL *http_handle;
CURLM *multi_handle = NULL; CURLM *multi_handle = NULL;
CURLMcode code;
int res; int res;
int still_running; /* keep number of running handles */ int still_running; /* keep number of running handles */
@ -63,7 +62,7 @@ int test(char *URL)
curl_multi_add_handle(multi_handle, http_handle); curl_multi_add_handle(multi_handle, http_handle);
/* we start some action by calling perform right away */ /* 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) { while(still_running) {
struct timeval timeout; struct timeval timeout;
@ -98,7 +97,7 @@ int test(char *URL)
case 0: case 0:
default: default:
/* timeout or readable/writable sockets */ /* timeout or readable/writable sockets */
code = curl_multi_perform(multi_handle, &still_running); (void) curl_multi_perform(multi_handle, &still_running);
break; break;
} }
} }

View File

@ -27,14 +27,22 @@
* responses with a pre-written string saved in test case test2005. * responses with a pre-written string saved in test case test2005.
*/ */
#include <stdio.h> #define CURL_NO_OLDIES
#include <errno.h>
#include <unistd.h>
#include "setup.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#define ENABLE_CURLX_PRINTF
#include "curlx.h" /* from the private lib dir */ #include "curlx.h" /* from the private lib dir */
#include "getpart.h" #include "getpart.h"
#include "util.h" #include "util.h"
/* include memdebug.h last */
#include "memdebug.h"
#ifndef DEFAULT_LOGFILE #ifndef DEFAULT_LOGFILE
#define DEFAULT_LOGFILE "log/fake_ntlm.log" #define DEFAULT_LOGFILE "log/fake_ntlm.log"
#endif #endif