mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 01:10:08 +01:00
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 7f8815a9c3)
This commit is contained in:
parent
33d3ec3b3e
commit
7f139c8ea8
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue