Blame SOURCES/elfutils-0.178-curl-code-gcc-10.patch

ca9947
commit 374fbed3da0197f794a904e78e75e961c7e2e92c
ca9947
Author: Mark Wielaard <mark@klomp.org>
ca9947
Date:   Wed Dec 4 00:39:26 2019 +0100
ca9947
ca9947
    debuginfod: Fix implicit conversion from 'CURLcode' to 'CURLMcode'
ca9947
    
ca9947
    GCC10 warns when converting the value of one enum type into another:
ca9947
    
ca9947
    debuginfod-client.c:530:24: error: implicit conversion from ‘CURLcode’
ca9947
                                       to ‘CURLMcode’ [-Werror=enum-conversion]
ca9947
      530 |               curl_res = curl_easy_getinfo(target_handle,
ca9947
          |                        ^
ca9947
    
ca9947
    libcurl has different error code enums. The "easy" interfaces return
ca9947
    a CURLcode error. The "multi" interface functions return a CURLMcode.
ca9947
    
ca9947
    Signed-off-by: Mark Wielaard <mark@klomp.org>
ca9947
ca9947
diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
ca9947
index 6e62b86c..302ea2dc 100644
ca9947
--- a/debuginfod/debuginfod-client.c
ca9947
+++ b/debuginfod/debuginfod-client.c
ca9947
@@ -509,8 +509,6 @@ debuginfod_query_server (debuginfod_client *c,
ca9947
   long loops = 0;
ca9947
   do
ca9947
     {
ca9947
-      CURLMcode curl_res;
ca9947
-
ca9947
       if (c->progressfn) /* inform/check progress callback */
ca9947
         {
ca9947
           loops ++;
ca9947
@@ -518,6 +516,7 @@ debuginfod_query_server (debuginfod_client *c,
ca9947
           long pb = 0;
ca9947
           if (target_handle) /* we've committed to a server; report its download progress */
ca9947
             {
ca9947
+              CURLcode curl_res;
ca9947
 #ifdef CURLINFO_SIZE_DOWNLOAD_T
ca9947
               curl_off_t dl;
ca9947
               curl_res = curl_easy_getinfo(target_handle,
ca9947
@@ -564,10 +563,10 @@ debuginfod_query_server (debuginfod_client *c,
ca9947
           if (data[i].handle != target_handle)
ca9947
             curl_multi_remove_handle(curlm, data[i].handle);
ca9947
 
ca9947
-      curl_res = curl_multi_perform(curlm, &still_running);
ca9947
-      if (curl_res != CURLM_OK)
ca9947
+      CURLMcode curlm_res = curl_multi_perform(curlm, &still_running);
ca9947
+      if (curlm_res != CURLM_OK)
ca9947
         {
ca9947
-          switch (curl_res)
ca9947
+          switch (curlm_res)
ca9947
             {
ca9947
             case CURLM_CALL_MULTI_PERFORM: continue;
ca9947
             case CURLM_OUT_OF_MEMORY: rc = -ENOMEM; break;