Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/time Add a few casts to avoid (IMHO bogus) gcc warn...



details:   https://anonhg.NetBSD.org/src/rev/356e2f574ab5
branches:  trunk
changeset: 782276:356e2f574ab5
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Oct 25 13:14:32 2012 +0000

description:
Add a few casts to avoid (IMHO bogus) gcc warnings breaking the vax build.

diffstat:

 lib/libc/time/zic.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (44 lines):

diff -r 7e6fe760012e -r 356e2f574ab5 lib/libc/time/zic.c
--- a/lib/libc/time/zic.c       Thu Oct 25 11:53:14 2012 +0000
+++ b/lib/libc/time/zic.c       Thu Oct 25 13:14:32 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: zic.c,v 1.32 2012/10/24 00:30:52 christos Exp $        */
+/*     $NetBSD: zic.c,v 1.33 2012/10/25 13:14:32 martin Exp $  */
 /*
 ** This file is in the public domain, so clarified as of
 ** 2006-07-17 by Arthur David Olson.
@@ -10,7 +10,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: zic.c,v 1.32 2012/10/24 00:30:52 christos Exp $");
+__RCSID("$NetBSD: zic.c,v 1.33 2012/10/25 13:14:32 martin Exp $");
 #endif /* !defined lint */
 
 #include "version.h"
@@ -1128,11 +1128,11 @@
                error(_("time before zero"));
                return;
        }
-       if (dayoff < min_time / SECSPERDAY) {
+       if (dayoff < (long)(min_time / SECSPERDAY)) {
                error(_("time too small"));
                return;
        }
-       if (dayoff > max_time / SECSPERDAY) {
+       if (dayoff > (long)(max_time / SECSPERDAY)) {
                error(_("time too large"));
                return;
        }
@@ -2522,9 +2522,9 @@
 will not work with pre-2004 versions of zic"));
                }
        }
-       if (dayoff < min_time / SECSPERDAY)
+       if (dayoff < (long)(min_time / SECSPERDAY))
                return min_time;
-       if (dayoff > max_time / SECSPERDAY)
+       if (dayoff > (long)(max_time / SECSPERDAY))
                return max_time;
        t = (zic_t) dayoff * SECSPERDAY;
        return tadd(t, rp->r_tod);



Home | Main Index | Thread Index | Old Index