From: Yang Tse Date: Sat, 21 May 2011 12:10:17 +0000 (+0200) Subject: compiler warning: fix X-Git-Tag: curl-7_21_7~98 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fce7276f5446e7fc1003b98a9a752a3a42a0a247;p=thirdparty%2Fcurl.git compiler warning: fix Fix compiler warning: enumerated type mixed with another type --- diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c index 5710400bca..6027cc7baf 100644 --- a/lib/asyn-ares.c +++ b/lib/asyn-ares.c @@ -140,7 +140,7 @@ void Curl_resolver_global_cleanup(void) * URL-state specific environment ('resolver' member of the UrlState * structure). Fills the passed pointer by the initialized ares_channel. */ -int Curl_resolver_init(void **resolver) +CURLcode Curl_resolver_init(void **resolver) { int status = ares_init((ares_channel*)resolver); if(status != ARES_SUCCESS) { diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c index e073d3a584..cc444da4cf 100644 --- a/lib/asyn-thread.c +++ b/lib/asyn-thread.c @@ -119,7 +119,7 @@ void Curl_resolver_global_cleanup(void) * URL-state specific environment ('resolver' member of the UrlState * structure). Does nothing here. */ -int Curl_resolver_init(void **resolver) +CURLcode Curl_resolver_init(void **resolver) { (void)resolver; return CURLE_OK; diff --git a/lib/asyn.h b/lib/asyn.h index 4e16de03dc..34f9c14c57 100644 --- a/lib/asyn.h +++ b/lib/asyn.h @@ -60,7 +60,7 @@ void Curl_resolver_global_cleanup(void); * Returning anything else than CURLE_OK fails curl_easy_init() with the * correspondent code. */ -int Curl_resolver_init(void **resolver); +CURLcode Curl_resolver_init(void **resolver); /* * Curl_resolver_cleanup() diff --git a/lib/url.c b/lib/url.c index b0b2d8f130..ac3399b9e8 100644 --- a/lib/url.c +++ b/lib/url.c @@ -765,7 +765,7 @@ CURLcode Curl_open(struct SessionHandle **curl) { CURLcode res = CURLE_OK; struct SessionHandle *data; - int status; + CURLcode status; /* Very simple start-up: alloc the struct, init it with zeroes and return */ data = calloc(1, sizeof(struct SessionHandle));