This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[COMMITTED PATCH] BZ#14280: Fix Hurd ioctl macro to avoid warning.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Mon, 8 Apr 2013 14:35:03 -0700 (PDT)
- Subject: [COMMITTED PATCH] BZ#14280: Fix Hurd ioctl macro to avoid warning.
2013-04-08 Roland McGrath <roland@hack.frob.com>
[BZ #14280]
* sysdeps/mach/hurd/bits/ioctls.h (_IOTS): Cast to enum __ioctl_datum
when computing value.
--- a/sysdeps/mach/hurd/bits/ioctls.h
+++ b/sysdeps/mach/hurd/bits/ioctls.h
@@ -141,7 +141,7 @@ enum __ioctl_datum { IOC_8, IOC_16, IOC_32, IOC_64 };
/* Construct an individual type field for TYPE. */
#define _IOTS(type) \
- (sizeof (type) == 8 ? IOC_64 : (sizeof (type) >> 1))
+ (sizeof (type) == 8 ? IOC_64 : (enum __ioctl_datum) (sizeof (type) >> 1))
/* Construct a type information field for
a single argument of the scalar TYPE. */