1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00

Replace %ld with %jd and cast to intmax_t

This commit is contained in:
H.J. Lu
2014-12-19 14:04:35 -08:00
parent 37f469007d
commit fe342f5013
3 changed files with 6 additions and 3 deletions

View File

@@ -25,6 +25,8 @@
* stdio-common/tst-fmemopen2.c (do_test): Replace %ld with %jd * stdio-common/tst-fmemopen2.c (do_test): Replace %ld with %jd
and cast to intmax_t. and cast to intmax_t.
* sysdeps/pthread/tst-timer.c (main): Likewise. * sysdeps/pthread/tst-timer.c (main): Likewise.
* time/clocktest.c (main): Likewise.
* time/tst-posixtz.c (do_test): Likewise.
2014-12-30 Andrew Senkevich <andrew.senkevich@intel.com> 2014-12-30 Andrew Senkevich <andrew.senkevich@intel.com>
H.J. Lu <hongjiu.lu@intel.com> H.J. Lu <hongjiu.lu@intel.com>

View File

@@ -28,8 +28,8 @@ main (int argc, char ** argv)
while (!gotit); while (!gotit);
stop = clock (); stop = clock ();
printf ("%ld clock ticks per second (start=%ld,stop=%ld)\n", printf ("%jd clock ticks per second (start=%jd,stop=%jd)\n",
stop - start, start, stop); (intmax_t) (stop - start), (intmax_t) start, (intmax_t) stop);
printf ("CLOCKS_PER_SEC=%ld, sysconf(_SC_CLK_TCK)=%ld\n", printf ("CLOCKS_PER_SEC=%ld, sysconf(_SC_CLK_TCK)=%ld\n",
CLOCKS_PER_SEC, sysconf(_SC_CLK_TCK)); CLOCKS_PER_SEC, sysconf(_SC_CLK_TCK));
return 0; return 0;

View File

@@ -39,7 +39,8 @@ do_test (void)
char buf[100]; char buf[100];
struct tm *tmp; struct tm *tmp;
printf ("TZ = \"%s\", time = %ld => ", tests[cnt].tz, tests[cnt].when); printf ("TZ = \"%s\", time = %jd => ", tests[cnt].tz,
(intmax_t) tests[cnt].when);
fflush (stdout); fflush (stdout);
setenv ("TZ", tests[cnt].tz, 1); setenv ("TZ", tests[cnt].tz, 1);