Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/riscv/include Avoid -Wconversion warnings
details: https://anonhg.NetBSD.org/src/rev/12b58809aadc
branches: trunk
changeset: 450463:12b58809aadc
user: maya <maya%NetBSD.org@localhost>
date: Mon Apr 15 14:03:32 2019 +0000
description:
Avoid -Wconversion warnings
diffstat:
sys/arch/riscv/include/byte_swap.h | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diffs (21 lines):
diff -r b8eb73c4a130 -r 12b58809aadc sys/arch/riscv/include/byte_swap.h
--- a/sys/arch/riscv/include/byte_swap.h Mon Apr 15 14:02:23 2019 +0000
+++ b/sys/arch/riscv/include/byte_swap.h Mon Apr 15 14:03:32 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: byte_swap.h,v 1.3 2014/10/28 20:25:36 dennis Exp $ */
+/* $NetBSD: byte_swap.h,v 1.4 2019/04/15 14:03:32 maya Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -88,10 +88,8 @@
static __inline uint16_t
__byte_swap_u16_variable(uint16_t v)
{
- v &= 0xffff;
- v = (v >> 8) | (v << 8);
- return v;
+ return (uint16_t)((v >> 8) | (v << 8));
}
__END_DECLS
Home |
Main Index |
Thread Index |
Old Index