This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 6/6] __FDS_BITS: Added cast to __fd_mask* to avoid warning.
- From: kosaki dot motohiro at gmail dot com
- To: libc-alpha at sourceware dot org
- Cc: KOSAKI Motohiro <kosaki dot motohiro at gmail dot com>
- Date: Fri, 29 Mar 2013 11:17:24 -0400
- Subject: [PATCH 6/6] __FDS_BITS: Added cast to __fd_mask* to avoid warning.
- References: <1364570244-2088-1-git-send-email-kosaki dot motohiro at gmail dot com>
From: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
---
ChangeLog | 5 +++++
misc/sys/select.h | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f22987c..4326f6d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2013-03-29 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * misc/sys/select.h (__FDS_BITS): Added a cast to
+ __fd_mask* to avoid warning.
+
+2013-03-29 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
* debug/tst-chk1.c (do_test): Added tests for fd_set allocation
from heap.
diff --git a/misc/sys/select.h b/misc/sys/select.h
index 6a6dce6..5d3f3cd 100644
--- a/misc/sys/select.h
+++ b/misc/sys/select.h
@@ -67,10 +67,10 @@ typedef struct
from the global namespace. */
#ifdef __USE_XOPEN
__fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
-# define __FDS_BITS(set) ((set)->fds_bits)
+# define __FDS_BITS(set) ((__fd_mask*)((set)->fds_bits))
#else
__fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS];
-# define __FDS_BITS(set) ((set)->__fds_bits)
+# define __FDS_BITS(set) ((__fd_mask*)((set)->__fds_bits))
#endif
} fd_set;
--
1.7.1