diff options
author | Adhemerval Zanella Netto <adhemerval.zanella@linaro.org> | 2022-09-01 10:02:30 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-09-22 08:48:04 -0300 |
commit | de477abcaaabb1f9815cb63876637a47a95e7ac1 (patch) | |
tree | 22bd98fe9a4aaa03257147db719e844fcdb42f7a /nptl | |
parent | 340097d0b50eff9d3058e06c6989ae398c653d4a (diff) | |
download | glibc-de477abcaaabb1f9815cb63876637a47a95e7ac1.tar.gz glibc-de477abcaaabb1f9815cb63876637a47a95e7ac1.tar.xz glibc-de477abcaaabb1f9815cb63876637a47a95e7ac1.zip |
Use '%z' instead of '%Z' on printf functions
The Z modifier is a nonstandard synonymn for z (that predates z itself) and compiler might issue an warning for in invalid conversion specifier. Reviewed-by: Florian Weimer <fweimer@redhat.com>
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/tst-rwlock6.c | 12 | ||||
-rw-r--r-- | nptl/tst-rwlock7.c | 16 |
2 files changed, 14 insertions, 14 deletions
diff --git a/nptl/tst-rwlock6.c b/nptl/tst-rwlock6.c index 8294868f3b..acf36098eb 100644 --- a/nptl/tst-rwlock6.c +++ b/nptl/tst-rwlock6.c @@ -104,16 +104,16 @@ do_test_clock (clockid_t clockid, const char *fnname) pthread_rwlockattr_t a; if (pthread_rwlockattr_init (&a) != 0) - FAIL_EXIT1 ("round %Zu: rwlockattr_t failed\n", cnt); + FAIL_EXIT1 ("round %zu: rwlockattr_t failed\n", cnt); if (pthread_rwlockattr_setkind_np (&a, kind[cnt]) != 0) - FAIL_EXIT1 ("round %Zu: rwlockattr_setkind failed\n", cnt); + FAIL_EXIT1 ("round %zu: rwlockattr_setkind failed\n", cnt); if (pthread_rwlock_init (&r, &a) != 0) - FAIL_EXIT1 ("round %Zu: rwlock_init failed\n", cnt); + FAIL_EXIT1 ("round %zu: rwlock_init failed\n", cnt); if (pthread_rwlockattr_destroy (&a) != 0) - FAIL_EXIT1 ("round %Zu: rwlockattr_destroy failed\n", cnt); + FAIL_EXIT1 ("round %zu: rwlockattr_destroy failed\n", cnt); struct timespec ts; xclock_gettime (clockid_for_get, &ts); @@ -124,7 +124,7 @@ do_test_clock (clockid_t clockid, const char *fnname) ? pthread_rwlock_timedwrlock (&r, &ts) : pthread_rwlock_clockwrlock (&r, clockid, &ts); if (e != 0) - FAIL_EXIT1 ("round %Zu: %swrlock failed (%d)\n", + FAIL_EXIT1 ("round %zu: %swrlock failed (%d)\n", cnt, fnname, e); verbose_printf ("1st %swrlock done\n", fnname); @@ -160,7 +160,7 @@ do_test_clock (clockid_t clockid, const char *fnname) puts ("joined thread"); if (pthread_rwlock_destroy (&r) != 0) - FAIL_EXIT1 ("round %Zu: rwlock_destroy failed\n", cnt); + FAIL_EXIT1 ("round %zu: rwlock_destroy failed\n", cnt); } return 0; diff --git a/nptl/tst-rwlock7.c b/nptl/tst-rwlock7.c index a228009a92..7427bf8e20 100644 --- a/nptl/tst-rwlock7.c +++ b/nptl/tst-rwlock7.c @@ -100,16 +100,16 @@ do_test_clock (clockid_t clockid, const char *fnname) pthread_rwlockattr_t a; if (pthread_rwlockattr_init (&a) != 0) - FAIL_EXIT1 ("round %Zu: rwlockattr_t failed\n", cnt); + FAIL_EXIT1 ("round %zu: rwlockattr_t failed\n", cnt); if (pthread_rwlockattr_setkind_np (&a, kind[cnt]) != 0) - FAIL_EXIT1 ("round %Zu: rwlockattr_setkind failed\n", cnt); + FAIL_EXIT1 ("round %zu: rwlockattr_setkind failed\n", cnt); if (pthread_rwlock_init (&r, &a) != 0) - FAIL_EXIT1 ("round %Zu: rwlock_init failed\n", cnt); + FAIL_EXIT1 ("round %zu: rwlock_init failed\n", cnt); if (pthread_rwlockattr_destroy (&a) != 0) - FAIL_EXIT1 ("round %Zu: rwlockattr_destroy failed\n", cnt); + FAIL_EXIT1 ("round %zu: rwlockattr_destroy failed\n", cnt); struct timespec ts; xclock_gettime (clockid_for_get, &ts); @@ -119,10 +119,10 @@ do_test_clock (clockid_t clockid, const char *fnname) /* Get a read lock. */ if (clockid == CLOCK_USE_TIMEDLOCK) { if (pthread_rwlock_timedrdlock (&r, &ts) != 0) - FAIL_EXIT1 ("round %Zu: rwlock_timedrdlock failed\n", cnt); + FAIL_EXIT1 ("round %zu: rwlock_timedrdlock failed\n", cnt); } else { if (pthread_rwlock_clockrdlock (&r, clockid, &ts) != 0) - FAIL_EXIT1 ("round %Zu: rwlock_%srdlock failed\n", cnt, fnname); + FAIL_EXIT1 ("round %zu: rwlock_%srdlock failed\n", cnt, fnname); } printf ("%zu: got %srdlock\n", cnt, fnname); @@ -134,10 +134,10 @@ do_test_clock (clockid_t clockid, const char *fnname) pthread_t th = xpthread_create (NULL, tf, &args); void *status = xpthread_join (th); if (status != NULL) - FAIL_EXIT1 ("failure in round %Zu\n", cnt); + FAIL_EXIT1 ("failure in round %zu\n", cnt); if (pthread_rwlock_destroy (&r) != 0) - FAIL_EXIT1 ("round %Zu: rwlock_destroy failed\n", cnt); + FAIL_EXIT1 ("round %zu: rwlock_destroy failed\n", cnt); } return 0; |