Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys Appease gcc-5 (devmajor_t and devminor_t are signed, ...
details: https://anonhg.NetBSD.org/src/rev/840aa04cfa21
branches: trunk
changeset: 344218:840aa04cfa21
user: christos <christos%NetBSD.org@localhost>
date: Thu Mar 17 00:48:49 2016 +0000
description:
Appease gcc-5 (devmajor_t and devminor_t are signed, so using them to
compose dev_t causes sign warnings).
diffstat:
sys/sys/types.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (22 lines):
diff -r bc92791a1bc7 -r 840aa04cfa21 sys/sys/types.h
--- a/sys/sys/types.h Thu Mar 17 00:42:49 2016 +0000
+++ b/sys/sys/types.h Thu Mar 17 00:48:49 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.95 2015/08/27 12:30:51 pooka Exp $ */
+/* $NetBSD: types.h,v 1.96 2016/03/17 00:48:49 christos Exp $ */
/*-
* Copyright (c) 1982, 1986, 1991, 1993, 1994
@@ -260,9 +260,9 @@
#define major(x) ((devmajor_t)(((uint32_t)(x) & 0x000fff00) >> 8))
#define minor(x) ((devminor_t)((((uint32_t)(x) & 0xfff00000) >> 12) | \
(((uint32_t)(x) & 0x000000ff) >> 0)))
-#define makedev(x,y) ((dev_t)((((x) << 8) & 0x000fff00) | \
- (((y) << 12) & 0xfff00000) | \
- (((y) << 0) & 0x000000ff)))
+#define makedev(x,y) ((dev_t)((((dev_t)(x) << 8) & 0x000fff00U) | \
+ (((dev_t)(y) << 12) & 0xfff00000U) | \
+ (((dev_t)(y) << 0) & 0x000000ffU)))
#endif
#ifdef _BSD_CLOCK_T_
Home |
Main Index |
Thread Index |
Old Index