Commit 7f8815a9 authored by Thomas Haller's avatar Thomas Haller

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/
      CCLD     src/
      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
parent 348ffdec
......@@ -144,7 +144,7 @@ curl_check_connectivity (CURLM *mhandle, CURLMcode ret)
/* 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);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment