From f444e5286ee8986adb0899f85cc292fc2cd7cd04 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 4 Jul 2008 00:37:40 -0700 Subject: Work around gcc warnings from curl headers After master.k.org upgrade, I started seeing these warning messages: transport.c: In function 'get_refs_via_curl': transport.c:458: error: call to '_curl_easy_setopt_err_write_callback' declared with attribute warning: curl_easy_setopt expects a curl_write_callback argument for this option It appears that the curl header wants to enforce the function signature for callback function given to curl_easy_setopt() to be compatible with that of (*curl_write_callback) or fwrite. This patch seems to work the issue around. Signed-off-by: Junio C Hamano --- http.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'http.h') diff --git a/http.h b/http.h index a04fc6a927..905b4629a4 100644 --- a/http.h +++ b/http.h @@ -64,12 +64,9 @@ struct buffer }; /* Curl request read/write callbacks */ -extern size_t fread_buffer(void *ptr, size_t eltsize, size_t nmemb, - struct buffer *buffer); -extern size_t fwrite_buffer(const void *ptr, size_t eltsize, - size_t nmemb, struct strbuf *buffer); -extern size_t fwrite_null(const void *ptr, size_t eltsize, - size_t nmemb, struct strbuf *buffer); +extern size_t fread_buffer(void *ptr, size_t eltsize, size_t nmemb, void *strbuf); +extern size_t fwrite_buffer(const void *ptr, size_t eltsize, size_t nmemb, void *strbuf); +extern size_t fwrite_null(const void *ptr, size_t eltsize, size_t nmemb, void *strbuf); /* Slot lifecycle functions */ extern struct active_request_slot *get_active_slot(void); -- cgit v1.2.1