ruby-changes:28272
From: akr <ko1@a...>
Date: Tue, 16 Apr 2013 23:09:22 +0900 (JST)
Subject: [ruby-changes:28272] akr:r40324 (trunk): * ext/socket/unixsocket.c (unix_send_io): Suppress a warning by clang.
akr 2013-04-16 23:07:50 +0900 (Tue, 16 Apr 2013) New Revision: 40324 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40324 Log: * ext/socket/unixsocket.c (unix_send_io): Suppress a warning by clang. (unix_recv_io): Ditto. Modified files: trunk/ChangeLog trunk/ext/socket/unixsocket.c Index: ChangeLog =================================================================== --- ChangeLog (revision 40323) +++ ChangeLog (revision 40324) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Apr 16 23:07:12 2013 Tanaka Akira <akr@f...> + + * ext/socket/unixsocket.c (unix_send_io): Suppress a warning by clang. + (unix_recv_io): Ditto. + Tue Apr 16 12:27:00 2013 Zachary Scott <zachary@z...> * ext/sdbm/init.c: Fix comment indentation, by windwiny [Fixes GH-277] Index: ext/socket/unixsocket.c =================================================================== --- ext/socket/unixsocket.c (revision 40323) +++ ext/socket/unixsocket.c (revision 40324) @@ -208,9 +208,9 @@ unix_send_io(VALUE sock, VALUE val) https://github.com/ruby/ruby/blob/trunk/ext/socket/unixsocket.c#L208 char buf[1]; #if FD_PASSING_BY_MSG_CONTROL - struct { + union { struct cmsghdr hdr; - char pad[8+sizeof(int)+8]; + char pad[sizeof(struct cmsghdr)+8+sizeof(int)+8]; } cmsg; #endif @@ -303,9 +303,9 @@ unix_recv_io(int argc, VALUE *argv, VALU https://github.com/ruby/ruby/blob/trunk/ext/socket/unixsocket.c#L303 int fd; #if FD_PASSING_BY_MSG_CONTROL - struct { + union { struct cmsghdr hdr; - char pad[8+sizeof(int)+8]; + char pad[sizeof(struct cmsghdr)+8+sizeof(int)+8]; } cmsg; #endif -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/