Source-Changes-HG archive

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

[src/trunk]: src/sys/sys Avoid warnings about conversions from "unsigned long...



details:   https://anonhg.NetBSD.org/src/rev/d09864b83a24
branches:  trunk
changeset: 569903:d09864b83a24
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Sep 13 01:46:39 2004 +0000

description:
Avoid warnings about conversions from "unsigned long long" to "unsigned int"
and from "unsigned int" to "unsigned long long".

diffstat:

 sys/sys/endian.h |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (31 lines):

diff -r 3b7cdb739c4b -r d09864b83a24 sys/sys/endian.h
--- a/sys/sys/endian.h  Mon Sep 13 01:24:46 2004 +0000
+++ b/sys/sys/endian.h  Mon Sep 13 01:46:39 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: endian.h,v 1.11 2004/09/13 01:24:46 thorpej Exp $      */
+/*     $NetBSD: endian.h,v 1.12 2004/09/13 01:46:39 thorpej Exp $      */
 
 /*
  * Copyright (c) 1987, 1991, 1993
@@ -253,8 +253,8 @@
 {
        uint8_t *p = buf;
 
-       be32enc(p, u >> 32);
-       be32enc(p + 4, u & 0xffffffffU);
+       be32enc(p, (uint32_t)(u >> 32));
+       be32enc(p + 4, (uint32_t)(u & 0xffffffffULL));
 }
 
 static __inline void __unused
@@ -262,8 +262,8 @@
 {
        uint8_t *p = buf;
 
-       le32enc(p, u & 0xffffffffU);
-       le32enc(p + 4, u >> 32);
+       le32enc(p, (uint32_t)(u & 0xffffffffULL));
+       le32enc(p + 4, (uint32_t)(u >> 32));
 }
 
 static __inline uint64_t __unused



Home | Main Index | Thread Index | Old Index