Use of struct with cmsghdr and pad is a GNU extension. When built with Clang, warnings are issued as such. So take the union approach instead. To fix this, I used an example at: http://www.rootr.net/man/man/CMSG_SPACE This is a second try to fix clang warnings in io.cpp. The reverted first try was: a9648cf Ignore all GNU-extension warnings As an alternative approach to it, I fixed the code itself.
This reverts commit 95bb2fe.
This reverts commit a9648cf.
This commit suppresses following warnings from Clang: vm/builtin/io.cpp:1101:22: error: field 'hdr' with variable sized type 'struct cmsghdr' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu] struct cmsghdr hdr; ^ vm/builtin/io.cpp:1146:22: error: field 'hdr' with variable sized type 'struct cmsghdr' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu] struct cmsghdr hdr; ^ 2 errors generated.
This suppresses a following warning by running specs with Rubinius built by clang: spec/ruby/optional/capi/ext/class_spec.c:108:2: warning: implicit declaration of function 'rb_cvar_set_internal' is invalid in C99 [-Wimplicit-function-declaration] rb_cvar_set(klass, rb_intern(StringValuePtr(name)), val); ^ vm/capi/19/include/ruby/ruby.h:1096:23: note: expanded from: #define rb_cvar_set rb_cvar_set_internal ^ 1 warning generated.
These methods should't be public, there are more methods that shouldn't be public but they need more work or is not currently possible.
These methods where called directly by #flush_next_in and #flush_next_out and are not in MRI so let's remove them for the sake of consistency.
Corrected a typo in Float#to_s spec description
Instead of *decimal places* we should use *significant figures* to describe the number of digits that carry meaning contributing to precision of those numbers. http://en.wikipedia.org/wiki/Significant_figures I think :)
String#delete raises ArgumentError if the given ranges are invalid in 1....