Add casts to int to rdunit() and rdpart() macro to suppress a warning

since they are unlikely 64 bits.

XXX: actually these should be DISKUNIT() and DISKPART() in <sys/disklabel.h>.
This commit is contained in:
tsutsui 2009-01-11 18:19:53 +00:00
parent ff4ab241aa
commit acde3c90d0
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: rdvar.h,v 1.18 2008/03/29 06:47:08 tsutsui Exp $ */
/* $NetBSD: rdvar.h,v 1.19 2009/01/11 18:19:53 tsutsui Exp $ */
/*
* Copyright (c) 1982, 1990, 1993
@ -132,8 +132,8 @@ struct rd_softc {
#define RDF_WANTED 0x20
#define RDF_WLABEL 0x40
#define rdunit(x) (minor(x) >> 3)
#define rdpart(x) (minor(x) & 0x7)
#define rdunit(x) ((int)(minor(x) >> 3))
#define rdpart(x) ((int)(minor(x) & 0x7))
#define rdpunit(x) ((x) & 7)
#define rdlabdev(d) (dev_t)(((int)(d)&~7)|2) /* rd?c */