This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 5/5] __FDS_BITS: Added cast to __fd_mask* to avoid warning.
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: KOSAKI Motohiro <kosaki dot motohiro at gmail dot com>
- Cc: libc-alpha at sourceware dot org, libc-ports at sourceware dot org
- Date: Tue, 30 Apr 2013 22:44:46 -0400
- Subject: Re: [PATCH 5/5] __FDS_BITS: Added cast to __fd_mask* to avoid warning.
- References: <1365900451-19026-1-git-send-email-kosaki dot motohiro at gmail dot com> <1365900451-19026-6-git-send-email-kosaki dot motohiro at gmail dot com>
On 04/13/2013 08:47 PM, KOSAKI Motohiro wrote:
> Signed-off-by: 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 b154c3c..c027ab8 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -29,6 +29,11 @@
>
> 2013-03-25 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
>
> + * misc/sys/select.h (__FDS_BITS): Added a cast to
> + __fd_mask* to avoid warning.
> +
> +2013-03-25 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 341190c..99d330f 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;
>
>
Obviously OK once we get the rest of the patches sorted.
Cheers,
Carlos.