Mercurial > hg > octave-nkf > gnulib-hg
changeset 14040:6beda9a0e57a
times test: Avoid gcc warnings on OSF/1.
* tests/test-times.c (main): Cast printf arguments from clock_t to
'long int'.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Mon, 27 Dec 2010 11:04:43 +0100 |
parents | aeebba7a29c7 |
children | 1bc2888f2fcb |
files | ChangeLog tests/test-times.c |
diffstat | 2 files changed, 16 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-12-27 Bruno Haible <bruno@clisp.org> + + times test: Avoid gcc warnings on OSF/1. + * tests/test-times.c (main): Cast printf arguments from clock_t to + 'long int'. + 2010-12-27 Paul Eggert <eggert@cs.ucla.edu> utimens: work around glibc rounding bug on older Linux kernels
--- a/tests/test-times.c +++ b/tests/test-times.c @@ -60,11 +60,11 @@ { printf ("clk_tck %ld\n", (long int) clk_tck); - printf ("t %ld\n", t); - printf ("tms.tms_utime %ldms\n", (tms.tms_utime * 1000) / clk_tck); - printf ("tms.tms_stime %ldms\n", (tms.tms_stime * 1000) / clk_tck); - printf ("tms.tms_cutime %ldms\n", (tms.tms_cutime * 1000) / clk_tck); - printf ("tms.tms_cstime %ldms\n", (tms.tms_cstime * 1000) / clk_tck); + printf ("t %ld\n", (long int) t); + printf ("tms.tms_utime %ldms\n", ((long int) tms.tms_utime * 1000) / clk_tck); + printf ("tms.tms_stime %ldms\n", ((long int) tms.tms_stime * 1000) / clk_tck); + printf ("tms.tms_cutime %ldms\n", ((long int) tms.tms_cutime * 1000) / clk_tck); + printf ("tms.tms_cstime %ldms\n", ((long int) tms.tms_cstime * 1000) / clk_tck); } if (argc > 1) @@ -94,11 +94,11 @@ { printf ("clk_tck %ld\n", (long int) clk_tck); - printf ("t %ld\n", t); - printf ("tms.tms_utime %ldms\n", (tms.tms_utime * 1000) / clk_tck); - printf ("tms.tms_stime %ldms\n", (tms.tms_stime * 1000) / clk_tck); - printf ("tms.tms_cutime %ldms\n", (tms.tms_cutime * 1000) / clk_tck); - printf ("tms.tms_cstime %ldms\n", (tms.tms_cstime * 1000) / clk_tck); + printf ("t %ld\n", (long int) t); + printf ("tms.tms_utime %ldms\n", ((long int) tms.tms_utime * 1000) / clk_tck); + printf ("tms.tms_stime %ldms\n", ((long int) tms.tms_stime * 1000) / clk_tck); + printf ("tms.tms_cutime %ldms\n", ((long int) tms.tms_cutime * 1000) / clk_tck); + printf ("tms.tms_cstime %ldms\n", ((long int) tms.tms_cstime * 1000) / clk_tck); } return 0;