Blame SOURCES/glibc-rh1505492-types-5.patch
|
|
c6d234 |
commit be97091638d156a53009b4034c60b58eaf3efa24
|
|
|
c6d234 |
Author: Joseph Myers <joseph@codesourcery.com>
|
|
|
c6d234 |
Date: Thu Nov 27 03:24:18 2014 +0000
|
|
|
c6d234 |
|
|
|
c6d234 |
Fix nss/tst-nss-test1.c format warning.
|
|
|
c6d234 |
|
|
|
c6d234 |
Testing for 32-bit x86 shows up a warning "tst-nss-test1.c:25:3:
|
|
|
c6d234 |
warning: format '%ju' expects argument of type 'uintmax_t', but
|
|
|
c6d234 |
argument 2 has type 'int' [-Wformat=]". The argument is a difference
|
|
|
c6d234 |
of two pointers, a signed quantity of type ptrdiff_t for which the
|
|
|
c6d234 |
right format is %td; this patch makes this test use that format.
|
|
|
c6d234 |
|
|
|
c6d234 |
Tested for 32-bit x86.
|
|
|
c6d234 |
|
|
|
c6d234 |
* nss/tst-nss-test1.c (do_test): Use %td printf format for pointer
|
|
|
c6d234 |
difference, not %ju.
|
|
|
c6d234 |
|
|
|
c6d234 |
diff --git a/nss/tst-nss-test1.c b/nss/tst-nss-test1.c
|
|
|
c6d234 |
index 4e443d453909e231..c5750e0956ea9450 100644
|
|
|
c6d234 |
--- a/nss/tst-nss-test1.c
|
|
|
c6d234 |
+++ b/nss/tst-nss-test1.c
|
|
|
c6d234 |
@@ -21,7 +21,7 @@ do_test (void)
|
|
|
c6d234 |
if (p->pw_uid != *np || strncmp (p->pw_name, "name", 4) != 0
|
|
|
c6d234 |
|| atol (p->pw_name + 4) != *np)
|
|
|
c6d234 |
{
|
|
|
c6d234 |
- printf ("passwd entry %ju wrong (%s, %u)\n",
|
|
|
c6d234 |
+ printf ("passwd entry %td wrong (%s, %u)\n",
|
|
|
c6d234 |
np - pwdids, p->pw_name, p->pw_uid);
|
|
|
c6d234 |
retval = 1;
|
|
|
c6d234 |
break;
|