Re: curl 7.75.0 fails to compile

2021-02-04 Thread Ray Satiro via curl-library

On 2/4/2021 12:02 PM, Firefox OS via curl-library wrote:

I got following compilation error in 7.75 release.
It was OK in curl 7.74.
The attached patch fixes the compilation problem in my case.

http.c:1963:10: error: conflicting types for ‘Curl_add_timecondition’
  1963 | CURLcode Curl_add_timecondition(const struct connectdata *conn,
   |  ^~
In file included from urldata.h:136,
  from http.c:52:
http.h:67:10: note: previous declaration of ‘Curl_add_timecondition’ was here
67 | CURLcode Curl_add_timecondition(struct Curl_easy *data,
   |  ^~
http.c: In function ‘Curl_http’:
http.c:3167:37: warning: passing argument 1 of ‘Curl_add_timecondition’ from 
incompatible pointer type [-Wincompatible-pointer-types]
  3167 | result = Curl_add_timecondition(data, );
   | ^~~~
   | |
   | struct Curl_easy *
http.c:1963:59: note: expected ‘const struct connectdata *’ but argument is of 
type ‘struct Curl_easy *’
  1963 | CURLcode Curl_add_timecondition(const struct connectdata *conn,
   | ~~^~~~



Thanks, fixed in https://github.com/curl/curl/commit/145848e


---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

curl 7.75.0 fails to compile

2021-02-04 Thread Firefox OS via curl-library
Hi,

I got following compilation error in 7.75 release.
It was OK in curl 7.74.
The attached patch fixes the compilation problem in my case.

http.c:1963:10: error: conflicting types for ‘Curl_add_timecondition’
 1963 | CURLcode Curl_add_timecondition(const struct connectdata *conn,
  |  ^~
In file included from urldata.h:136,
 from http.c:52:
http.h:67:10: note: previous declaration of ‘Curl_add_timecondition’ was here
   67 | CURLcode Curl_add_timecondition(struct Curl_easy *data,
  |  ^~
http.c: In function ‘Curl_http’:
http.c:3167:37: warning: passing argument 1 of ‘Curl_add_timecondition’ from 
incompatible pointer type [-Wincompatible-pointer-types]
 3167 | result = Curl_add_timecondition(data, );
  | ^~~~
  | |
  | struct Curl_easy *
http.c:1963:59: note: expected ‘const struct connectdata *’ but argument is of 
type ‘struct Curl_easy *’
 1963 | CURLcode Curl_add_timecondition(const struct connectdata *conn,
  | ~~^~~~

-- 
--- a/lib/http.c
+++ b/lib/http.c
@@ -1960,10 +1960,10 @@
 }
 #else
 /* disabled */
-CURLcode Curl_add_timecondition(const struct connectdata *conn,
+CURLcode Curl_add_timecondition(struct Curl_easy *data,
 struct dynbuf *req)
 {
-  (void)conn;
+  (void)data;
   (void)req;
   return CURLE_OK;
 }
---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html