Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/include Avoid gcc warnings
details: https://anonhg.NetBSD.org/src/rev/8f9a051a67c0
branches: trunk
changeset: 350613:8f9a051a67c0
user: martin <martin%NetBSD.org@localhost>
date: Sat Jan 14 17:14:23 2017 +0000
description:
Avoid gcc warnings
diffstat:
sys/arch/arm/include/byte_swap.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (34 lines):
diff -r 674c5817b4f2 -r 8f9a051a67c0 sys/arch/arm/include/byte_swap.h
--- a/sys/arch/arm/include/byte_swap.h Sat Jan 14 16:34:44 2017 +0000
+++ b/sys/arch/arm/include/byte_swap.h Sat Jan 14 17:14:23 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: byte_swap.h,v 1.14 2017/01/13 19:30:38 christos Exp $ */
+/* $NetBSD: byte_swap.h,v 1.15 2017/01/14 17:14:23 martin Exp $ */
/*-
* Copyright (c) 1997, 1999, 2002 The NetBSD Foundation, Inc.
@@ -93,7 +93,7 @@
if (!__builtin_constant_p(v)) {
uint32_t v32 = v;
__asm("rev16\t%0, %1" : "=r" (v32) : "0" (v32));
- return v32;
+ return (uint16_t)v32;
}
#elif !defined(__thumb__) && 0 /* gcc produces decent code for this */
if (!__builtin_constant_p(v)) {
@@ -104,13 +104,13 @@
"bic %0, %0, %0, lsl #16"
: "=&r" (v0)
: "0" (v0));
- return v0;
+ return (uint16_t)v0;
}
#endif
v &= 0xffff;
v = (uint16_t)((v >> 8) | (v << 8));
- return v;
+ return (uint16_t)v;
}
__END_DECLS
Home |
Main Index |
Thread Index |
Old Index