diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2013-08-22 04:43:42 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2013-08-22 04:43:42 +0000 |
commit | 323d1abbc45a9dfeae3d39b5f8cc041dc4b73bd1 (patch) | |
tree | 64ea330e44da28fb9da88722be4cb4e200afe707 /bin/csh | |
parent | 31003a7e68970e14de72e158246cccd33cccc1e7 (diff) |
Correct format string mismatches turned up by -Wformat=2
suggestions and ok millert@
Diffstat (limited to 'bin/csh')
-rw-r--r-- | bin/csh/time.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/bin/csh/time.c b/bin/csh/time.c index 0550dac75b3..cfa3b4adfaa 100644 --- a/bin/csh/time.c +++ b/bin/csh/time.c @@ -1,4 +1,4 @@ -/* $OpenBSD: time.c,v 1.13 2013/04/16 22:13:30 deraadt Exp $ */ +/* $OpenBSD: time.c,v 1.14 2013/08/22 04:43:40 guenther Exp $ */ /* $NetBSD: time.c,v 1.7 1995/03/21 13:55:25 mycroft Exp $ */ /*- @@ -164,19 +164,20 @@ prusage(struct rusage *r0, struct rusage *r1, struct timeval *e, case 'X': /* (average) shared text size */ (void) fprintf(cshout, "%ld", t == 0 ? 0L : - (r1->ru_ixrss - r0->ru_ixrss) / t); + (long)((r1->ru_ixrss - r0->ru_ixrss) / t)); break; case 'D': /* (average) unshared data size */ (void) fprintf(cshout, "%ld", t == 0 ? 0L : - (r1->ru_idrss + r1->ru_isrss - - (r0->ru_idrss + r0->ru_isrss)) / t); + (long)((r1->ru_idrss + r1->ru_isrss - + (r0->ru_idrss + r0->ru_isrss)) / t)); break; case 'K': /* (average) total data memory used */ (void) fprintf(cshout, "%ld", t == 0 ? 0L : - ((r1->ru_ixrss + r1->ru_isrss + r1->ru_idrss) - - (r0->ru_ixrss + r0->ru_idrss + r0->ru_isrss)) / t); + (long)(((r1->ru_ixrss + r1->ru_isrss + r1->ru_idrss) + - (r0->ru_ixrss + r0->ru_idrss + r0->ru_isrss)) + / t)); break; case 'M': /* max. Resident Set Size */ |