aboutsummaryrefslogtreecommitdiff
path: root/support/support_test_compare_string.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2018-11-07 11:09:02 -0200
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2018-11-07 11:11:06 -0200
commit00c86a37d1b63044e3169d1f2ebec23447c73f79 (patch)
tree5b73905f73d584dc100c69846d2b7123a87cdaae /support/support_test_compare_string.c
parent1df872fd74f730bcae3df201a229195445d2e18a (diff)
downloadglibc-00c86a37d1b63044e3169d1f2ebec23447c73f79.tar
glibc-00c86a37d1b63044e3169d1f2ebec23447c73f79.tar.gz
glibc-00c86a37d1b63044e3169d1f2ebec23447c73f79.tar.bz2
glibc-00c86a37d1b63044e3169d1f2ebec23447c73f79.zip
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.
Diffstat (limited to 'support/support_test_compare_string.c')
-rw-r--r--support/support_test_compare_string.c2
1 files changed, 1 insertions, 1 deletions
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);