summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-05-12 09:37:42 +0200
committerThomas Haller <thaller@redhat.com>2017-05-12 09:56:58 +0200
commit7f139c8ea87d0ceaa1f1d3601c846ace9054ffe5 (patch)
treea206773bf889c72edc2f3695a129e6a905ea4bd9
parent33d3ec3b3e5d2e737afc8db6c64850e67db5c12d (diff)
downloadNetworkManager-7f139c8ea87d0ceaa1f1d3601c846ace9054ffe5.tar.gz
connectivity: avoid compiler warning for argument of curl_easy_getinfo()
libcurl employs some typechecking via "curl/typecheck-gcc.h". When compling with --enable-lto, compilation fails otherwise with: make[2]: Entering directory '/data/src/NetworkManager' CC src/src_libNetworkManager_la-nm-connectivity.lo CCLD src/libNetworkManager.la CCLD src/libNetworkManagerTest.la CCLD src/dhcp/tests/test-dhcp-dhclient src/nm-connectivity.c: In function 'curl_check_connectivity': src/nm-connectivity.c:147:10: error: call to '_curl_easy_getinfo_err_string' declared with attribute warning: curl_easy_getinfo expects a pointer to char * for this info [-Werror] eret = curl_easy_getinfo (msg->easy_handle, CURLINFO_PRIVATE, &cb_data); ^ lto1: all warnings being treated as errors lto-wrapper: fatal error: /usr/bin/gcc returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed (cherry picked from commit 7f8815a9c35c3b588b174c5e0c2568d3068726f6)
-rw-r--r--src/nm-connectivity.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nm-connectivity.c b/src/nm-connectivity.c
index 75bb7b6301..0708d965a2 100644
--- a/src/nm-connectivity.c
+++ b/src/nm-connectivity.c
@@ -144,7 +144,7 @@ curl_check_connectivity (CURLM *mhandle, CURLMcode ret)
continue;
/* Here we have completed a session. Check easy session result. */
- eret = curl_easy_getinfo (msg->easy_handle, CURLINFO_PRIVATE, &cb_data);
+ eret = curl_easy_getinfo (msg->easy_handle, CURLINFO_PRIVATE, (char **) &cb_data);
if (eret != CURLE_OK) {
_LOG2E ("curl cannot extract cb_data for easy handle %p, skipping msg", msg->easy_handle);
continue;