public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Dmitry Levin <ldv@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/release/2.27/master] support: Fix printf format for TEST_COMPARE_STRING Date: Tue, 21 Sep 2021 00:53:56 +0000 (GMT) [thread overview] Message-ID: <20210921005356.9A3CC3858418@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=62df32d604fb95243b0eaf1db8a8ef00d060ea1e commit 62df32d604fb95243b0eaf1db8a8ef00d060ea1e Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> Date: Wed Nov 7 11:09:02 2018 -0200 support: Fix printf format for TEST_COMPARE_STRING Fix the following on 32 bits targets: support_test_compare_string.c: In function 'support_test_compare_string': support_test_compare_string.c:80:37: error: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'size_t' {aka 'unsigned int'} [-Werror=format=] printf (" string length: %lu bytes\n", left_length); ~~^ ~~~~~~~~~~~ %u Checked on arm-linux-gnueabihf. * support/support_test_compare_string.c (support_test_compare_string): Fix printf format. (cherry picked from commit 00c86a37d1b63044e3169d1f2ebec23447c73f79) Diff: --- ChangeLog | 5 +++++ support/support_test_compare_string.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ba53136bec..190b9ea0d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2018-11-07 Adhemerval Zanella <adhemerval.zanella@linaro.org> + + * support/support_test_compare_string.c + (support_test_compare_string): Fix printf format. + 2018-11-07 Florian Weimer <fweimer@redhat.com> Implement TEST_COMPARE_STRING. diff --git a/support/support_test_compare_string.c b/support/support_test_compare_string.c index 9958aaeec1..a76ba8eda7 100644 --- a/support/support_test_compare_string.c +++ b/support/support_test_compare_string.c @@ -77,7 +77,7 @@ support_test_compare_string (const char *left, const char *right, support_record_failure (); printf ("%s:%d: error: blob comparison failed\n", file, line); if (left_length == right_length && right != NULL && left != NULL) - printf (" string length: %lu bytes\n", left_length); + printf (" string length: %zu bytes\n", left_length); else { report_length ("left", left, left_length);
reply other threads:[~2021-09-21 0:53 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210921005356.9A3CC3858418@sourceware.org \ --to=ldv@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).