[Libreoffice-commits] core.git: extensions/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sun Mar 21 19:48:19 UTC 2021


 extensions/source/update/check/download.cxx |   26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 96903f858e2f0b991350598f8b8bbe1b18d7bdc3
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Mar 21 15:00:28 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Mar 21 20:47:34 2021 +0100

    cid#1474008 silence Unchecked return value from library
    
    Change-Id: If09a4edb9826507d817f9b0bb425eed8f35bd9c4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112846
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/extensions/source/update/check/download.cxx b/extensions/source/update/check/download.cxx
index 3e8ad4e2c09c..1f98b7717be2 100644
--- a/extensions/source/update/check/download.cxx
+++ b/extensions/source/update/check/download.cxx
@@ -225,37 +225,37 @@ static bool curl_run(std::u16string_view rURL, OutData& out, const OString& aPro
         out.curl = pCURL;
 
         OString aURL(OUStringToOString(rURL, RTL_TEXTENCODING_UTF8));
-        curl_easy_setopt(pCURL, CURLOPT_URL, aURL.getStr());
+        (void)curl_easy_setopt(pCURL, CURLOPT_URL, aURL.getStr());
 
         // abort on http errors
-        curl_easy_setopt(pCURL, CURLOPT_FAILONERROR, 1);
+        (void)curl_easy_setopt(pCURL, CURLOPT_FAILONERROR, 1);
 
         // enable redirection
-        curl_easy_setopt(pCURL, CURLOPT_FOLLOWLOCATION, 1);
+        (void)curl_easy_setopt(pCURL, CURLOPT_FOLLOWLOCATION, 1);
         // only allow redirect to http:// and https://
-        curl_easy_setopt(pCURL, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
+        (void)curl_easy_setopt(pCURL, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
 
         // write function
-        curl_easy_setopt(pCURL, CURLOPT_WRITEDATA, &out);
-        curl_easy_setopt(pCURL, CURLOPT_WRITEFUNCTION, &write_function);
+        (void)curl_easy_setopt(pCURL, CURLOPT_WRITEDATA, &out);
+        (void)curl_easy_setopt(pCURL, CURLOPT_WRITEFUNCTION, &write_function);
 
         // progress handler - Condition::check unfortunately is not defined const
-        curl_easy_setopt(pCURL, CURLOPT_NOPROGRESS, 0);
-        curl_easy_setopt(pCURL, CURLOPT_PROGRESSFUNCTION, &progress_callback);
-        curl_easy_setopt(pCURL, CURLOPT_PROGRESSDATA, &out);
+        (void)curl_easy_setopt(pCURL, CURLOPT_NOPROGRESS, 0);
+        (void)curl_easy_setopt(pCURL, CURLOPT_PROGRESSFUNCTION, &progress_callback);
+        (void)curl_easy_setopt(pCURL, CURLOPT_PROGRESSDATA, &out);
 
         // proxy
-        curl_easy_setopt(pCURL, CURLOPT_PROXY, aProxyHost.getStr());
-        curl_easy_setopt(pCURL, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
+        (void)curl_easy_setopt(pCURL, CURLOPT_PROXY, aProxyHost.getStr());
+        (void)curl_easy_setopt(pCURL, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
         if( -1 != nProxyPort )
-            curl_easy_setopt(pCURL, CURLOPT_PROXYPORT, nProxyPort);
+            (void)curl_easy_setopt(pCURL, CURLOPT_PROXYPORT, nProxyPort);
 
         if( out.Offset > 0 )
         {
             // curl_off_t offset = nOffset; libcurl seems to be compiled with large
             // file support (and we not) ..
             sal_Int64 offset = static_cast<sal_Int64>(out.Offset);
-            curl_easy_setopt(pCURL, CURLOPT_RESUME_FROM_LARGE, offset);
+            (void)curl_easy_setopt(pCURL, CURLOPT_RESUME_FROM_LARGE, offset);
         }
 
         CURLcode cc = curl_easy_perform(pCURL);


More information about the Libreoffice-commits mailing list