resource-agents icon indicating copy to clipboard operation
resource-agents copied to clipboard

storage_mon: Fix printf format string on i686

Open hesiod opened this issue 2 years ago • 3 comments

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

hesiod avatar May 20 '23 11:05 hesiod

Can one of the admins verify this patch?

knet-ci-bot avatar May 20 '23 11:05 knet-ci-bot

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

hesiod avatar May 20 '23 13:05 hesiod

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

knet-jenkins[bot] avatar Jun 12 '23 08:06 knet-jenkins[bot]