summaryrefslogtreecommitdiff
path: root/ext/socket/ancdata.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-22 00:47:50 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-22 00:47:50 +0000
commit900b62a2e96228d75c3552e04e81fd12f474a1d3 (patch)
tree11c98bbe39879cbb1c083354eab72003ba9877a6 /ext/socket/ancdata.c
parentf1cbd700e8107f6871dfc18814f3a19b8beb225f (diff)
Supress warnings: unused variables
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/ancdata.c')
-rw-r--r--ext/socket/ancdata.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c
index 4ba339a..050da97 100644
--- a/ext/socket/ancdata.c
+++ b/ext/socket/ancdata.c
@@ -1163,8 +1163,10 @@ bsock_sendmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
#if defined(HAVE_ST_MSG_CONTROL)
int i;
size_t last_pad = 0;
+#if defined(__NetBSD__)
int last_level = 0;
int last_type = 0;
+#endif
controls_str = rb_str_tmp_new(0);
for (i = 0; i < controls_num; i++) {
VALUE elt = controls_ptr[i], v;
@@ -1203,8 +1205,10 @@ bsock_sendmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
cmh.cmsg_len = (socklen_t)CMSG_LEN(RSTRING_LEN(cdata));
MEMCPY(cmsg, &cmh, char, sizeof(cmh));
MEMCPY(cmsg+((char*)CMSG_DATA(&cmh)-(char*)&cmh), RSTRING_PTR(cdata), char, RSTRING_LEN(cdata));
+#if defined(__NetBSD__)
last_level = cmh.cmsg_level;
last_type = cmh.cmsg_type;
+#endif
last_pad = cspace - cmh.cmsg_len;
}
if (last_pad) {