From 7ba2040caac53d202ba1825b29833f8fa5320711 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Sat, 1 Feb 2020 11:38:08 +0100 Subject: [PATCH] all: remove wrong CURL option initialization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit curl_multi_setopt() accepts CURLMOPT_* options, not CURLOPT_* ones. Found by GCC 10: clients/cloud-setup/nm-http-client.c:700:38: error: implicit conversion from ‘enum ’ to ‘CURLMoption’ [-Werror=enum-conversion] 700 | curl_multi_setopt (priv->mhandle, CURLOPT_VERBOSE, 1); Fixes: 69f048bf0ca3 ('cloud-setup: add tool for automatic IP configuration in cloud') (cherry picked from commit c11ac34f4c565018aa1a5fcbdef72d5b8b2f6070) --- clients/cloud-setup/nm-http-client.c | 2 -- src/nm-connectivity.c | 1 - 2 files changed, 3 deletions(-) diff --git a/clients/cloud-setup/nm-http-client.c b/clients/cloud-setup/nm-http-client.c index 943310955a..17c6fcdf26 100644 --- a/clients/cloud-setup/nm-http-client.c +++ b/clients/cloud-setup/nm-http-client.c @@ -693,8 +693,6 @@ constructed (GObject *object) curl_multi_setopt (priv->mhandle, CURLMOPT_SOCKETDATA, self); curl_multi_setopt (priv->mhandle, CURLMOPT_TIMERFUNCTION, _mhandle_timerfunction_cb); curl_multi_setopt (priv->mhandle, CURLMOPT_TIMERDATA, self); - if (NM_CURL_DEBUG) - curl_multi_setopt (priv->mhandle, CURLOPT_VERBOSE, 1); } G_OBJECT_CLASS (nm_http_client_parent_class)->constructed (object); diff --git a/src/nm-connectivity.c b/src/nm-connectivity.c index ccac63766b..e941fe7eff 100644 --- a/src/nm-connectivity.c +++ b/src/nm-connectivity.c @@ -686,7 +686,6 @@ do_curl_request (NMConnectivityCheckHandle *cb_data) curl_multi_setopt (mhandle, CURLMOPT_SOCKETDATA, cb_data); curl_multi_setopt (mhandle, CURLMOPT_TIMERFUNCTION, multi_timer_cb); curl_multi_setopt (mhandle, CURLMOPT_TIMERDATA, cb_data); - curl_multi_setopt (mhandle, CURLOPT_VERBOSE, 1); switch (cb_data->addr_family) { case AF_INET: