Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage_mon: Fix printf format string on i686 #1870

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hesiod
Copy link

@hesiod hesiod commented May 20, 2023

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
Copy link

Can one of the admins verify this patch?

@hesiod
Copy link
Author

hesiod commented May 20, 2023

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

@knet-jenkins
Copy link

knet-jenkins bot commented Jun 12, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants