ClusterLabs / resource-agents

Combined repository of OCF agents from the RHCS and Linux-HA projects
GNU General Public License v2.0
489 stars 577 forks source link

storage_mon: Fix printf format string on i686 #1870

Open hesiod opened 1 year ago

hesiod commented 1 year ago

Fix build errors on i686:

storage_mon.c: In function 'test_device':
storage_mon.c:63:45: error: format '%zu' expects argument of type 'size_t', but argument 4 has type 'uint64_t' {aka 'long long unsigned int'} [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wformat=-Werror=format=8;;]
   63 |                 fprintf(stderr, "%s: size=%zu\n", device, devsize);
      |                                           ~~^             ~~~~~~~
      |                                             |             |
      |                                             unsigned int  uint64_t {aka long long unsigned int}
      |                                           %llu
storage_mon.c:87:51: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'unsigned int' [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wformat=-Werror=format=8;;]
   87 |                 fprintf(stderr, "Failed to read %ld bytes from %s, got %d\n", sizeof(buffer), device, res);
      |                                                 ~~^                           ~~~~~~~~~~~~~~
      |                                                   |                           |
      |                                                   long int                    unsigned int
      |                                                 %d
knet-ci-bot commented 1 year ago

Can one of the admins verify this patch?

hesiod commented 1 year ago

Unfortunately I just realized this PR breaks the build on x86_64.

knet-jenkins[bot] commented 1 year ago

Can one of the admins check and authorise this run please: https://ci.kronosnet.org/job/resource-agents-pipeline/job/PR-1870/1/input