compiler warning: fix
authorYang Tse <yangsita@gmail.com>
Sat, 21 May 2011 12:10:17 +0000 (14:10 +0200)
committerYang Tse <yangsita@gmail.com>
Sat, 21 May 2011 12:10:17 +0000 (14:10 +0200)
Fix compiler warning: enumerated type mixed with another type

lib/asyn-ares.c
lib/asyn-thread.c
lib/asyn.h
lib/url.c

index 5710400bca090a5a9bdcbe3c1dd017ed4f69fec4..6027cc7baf298fb118d0158dbabb1831dbb4162a 100644 (file)
@@ -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) {
index e073d3a584072f1a95546fe41ea2d897b7253f20..cc444da4cf07b7232909152e148dd1711106b4ac 100644 (file)
@@ -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;
index 4e16de03dcda328adc2eb76c09d0ec75804290c2..34f9c14c577e791900020a9d3f4978afe8cca226 100644 (file)
@@ -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()
index b0b2d8f1303e3585cda92f87e619bea4088ec3cf..ac3399b9e8e32fdd48a72948a44a40485e86b342 100644 (file)
--- 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));