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