resource-agents
resource-agents copied to clipboard
storage_mon: Fix printf format string on i686
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
Can one of the admins verify this patch?
Unfortunately I just realized this PR breaks the build on x86_64.
Can one of the admins check and authorise this run please: https://ci.kronosnet.org/job/resource-agents-pipeline/job/PR-1870/1/input