It was compiled in x86 environment and passed.

However, this code cannot be removed.

I have already resubmit this patch.

 

From: Alexander Kanavin <alex.kanavin@gmail.com>
Sent: Tuesday, May 18, 2021 5:40 PM
To: Wang, Mingyu/
鸣瑜 <wangmy@fujitsu.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [PATCH] elfutils: upgrade 0.183 -> 0.184

 

On Tue, 18 May 2021 at 03:43, wangmy <wangmy@fujitsu.com> wrote:

-@@ -263,7 +263,7 @@ debuginfod_clean_cache(debuginfod_client *c,
-       if (interval_file == NULL)
-         return -errno;
-
--      int rc = fprintf(interval_file, "%ld", cache_clean_default_interval_s);
-+      int rc = fprintf(interval_file, "%jd", (intmax_t)cache_clean_default_interval_s);
-       fclose(interval_file);
-
-       if (rc < 0)
-@@ -275,7 +275,7 @@ debuginfod_clean_cache(debuginfod_client *c,
-   interval_file = fopen(interval_path, "r");
-   if (interval_file)
-     {
--      if (fscanf(interval_file, "%ld", &clean_interval) != 1)
-+      if (fscanf(interval_file, "%jd", (intmax_t*)(&clean_interval)) != 1)
-         clean_interval = cache_clean_default_interval_s;
-       fclose(interval_file);
-     }
-@@ -291,7 +291,7 @@ debuginfod_clean_cache(debuginfod_client *c,
-   max_unused_file = fopen(max_unused_path, "r");
-   if (max_unused_file)
-     {
--      if (fscanf(max_unused_file, "%ld", &max_unused_age) != 1)
-+      if (fscanf(max_unused_file, "%jd", (intmax_t*)(&max_unused_age)) != 1)
-         max_unused_age = cache_default_max_unused_age_s;
-       fclose(max_unused_file);
-     }

 

I think this cannot be removed, it needs to be rebased (e.g. using 'devtool upgrade') - the problem is still there, it just moved to different functions:

https://sourceware.org/git/?p=elfutils.git;a=blob;f=debuginfod/debuginfod-client.c;h=ee7eda24df9f672eb291663cc35fb4b945ad70f5;hb=HEAD#l217

 

Can you try a x32 build to check please?

 

Alex