[sr-dev] git:master:1f5ba1a5: xcap_client: cast curl setopt params to avoid analyzer warnings

Daniel-Constantin Mierla miconda at gmail.com
Tue Jan 2 10:52:11 CET 2018


Module: kamailio
Branch: master
Commit: 1f5ba1a5ac2f652cd3a374200411767286803f9f
URL: https://github.com/kamailio/kamailio/commit/1f5ba1a5ac2f652cd3a374200411767286803f9f

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2018-01-01T13:39:58+01:00

xcap_client: cast curl setopt params to avoid analyzer warnings

---

Modified: src/modules/xcap_client/xcap_functions.c

---

Diff:  https://github.com/kamailio/kamailio/commit/1f5ba1a5ac2f652cd3a374200411767286803f9f.diff
Patch: https://github.com/kamailio/kamailio/commit/1f5ba1a5ac2f652cd3a374200411767286803f9f.patch

---

diff --git a/src/modules/xcap_client/xcap_functions.c b/src/modules/xcap_client/xcap_functions.c
index cee161b7d0..39768ee74a 100644
--- a/src/modules/xcap_client/xcap_functions.c
+++ b/src/modules/xcap_client/xcap_functions.c
@@ -514,11 +514,11 @@ char* send_http_get(char* path, unsigned int xcap_port, char* match_etag,
 
 	curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, write_function);
 
-	curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, &stream);
+	curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void*)(&stream));
 
 	curl_easy_setopt(curl_handle, CURLOPT_HEADERFUNCTION, get_xcap_etag);
 
-	curl_easy_setopt(curl_handle, CURLOPT_WRITEHEADER, &etag);
+	curl_easy_setopt(curl_handle, CURLOPT_WRITEHEADER, (void*)(&etag));
 
 	if(match_header)
 		curl_easy_setopt(curl_handle, CURLOPT_HEADER, (long)match_header);




More information about the sr-dev mailing list