Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/sleep Explicitly cast time_t to match format string - sh...



details:   https://anonhg.NetBSD.org/src/rev/6cbb32ec84aa
branches:  trunk
changeset: 448205:6cbb32ec84aa
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Jan 26 18:14:22 2019 +0000

description:
Explicitly cast time_t to match format string - should fix the build on
some 32bit architectures.

diffstat:

 bin/sleep/sleep.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 6ab806c4dd03 -r 6cbb32ec84aa bin/sleep/sleep.c
--- a/bin/sleep/sleep.c Sat Jan 26 16:44:30 2019 +0000
+++ b/bin/sleep/sleep.c Sat Jan 26 18:14:22 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sleep.c,v 1.27 2019/01/26 15:20:50 kre Exp $ */
+/* $NetBSD: sleep.c,v 1.28 2019/01/26 18:14:22 martin Exp $ */
 
 /*
  * Copyright (c) 1988, 1993, 1994
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)sleep.c    8.3 (Berkeley) 4/2/94";
 #else
-__RCSID("$NetBSD: sleep.c,v 1.27 2019/01/26 15:20:50 kre Exp $");
+__RCSID("$NetBSD: sleep.c,v 1.28 2019/01/26 18:14:22 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -202,7 +202,8 @@
        else if (remain < 2000)
                warnx("Between %ld and %ld seconds left"
                    " out of the original %g%s",
-                   remain, remain + 1, (double)original, msg);
+                   (long)remain, (long)remain + 1, (double)original,
+                   msg);
        else if ((original - remain) < 100000 && (original-remain) < original/8)
                warnx("Have waited only %d seconds of the original %g",
                        (int)(original - remain), (double)original);



Home | Main Index | Thread Index | Old Index