ruby-changes:40410
From: nobu <ko1@a...>
Date: Sun, 8 Nov 2015 14:54:38 +0900 (JST)
Subject: [ruby-changes:40410] nobu:r52491 (trunk): suppress warnings
nobu 2015-11-08 14:54:29 +0900 (Sun, 08 Nov 2015) New Revision: 52491 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52491 Log: suppress warnings * ext/date/date_parse.c (date_zone_to_diff): suppress parentheses warnings. Modified files: trunk/ext/date/date_parse.c trunk/ext/openssl/ossl_ssl.c Index: ext/date/date_parse.c =================================================================== --- ext/date/date_parse.c (revision 52490) +++ ext/date/date_parse.c (revision 52491) @@ -530,13 +530,13 @@ date_zone_to_diff(VALUE str) https://github.com/ruby/ruby/blob/trunk/ext/date/date_parse.c#L530 str = rb_str_new2(s); - if (p = strchr(s, ':')) { + if ((p = strchr(s, ':')) != NULL) { hour = rb_str_new(s, p - s); s = ++p; - if (p = strchr(s, ':')) { + if ((p = strchr(s, ':')) != NULL) { min = rb_str_new(s, p - s); s = ++p; - if (p = strchr(s, ':')) { + if ((p = strchr(s, ':')) != NULL) { sec = rb_str_new(s, p - s); } else Index: ext/openssl/ossl_ssl.c =================================================================== --- ext/openssl/ossl_ssl.c (revision 52490) +++ ext/openssl/ossl_ssl.c (revision 52491) @@ -589,7 +589,7 @@ ssl_npn_select_cb_common(VALUE cb, const https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl_ssl.c#L589 VALUE protocols = rb_ary_new(); /* The format is len_1|proto_1|...|len_n|proto_n\0 */ - while (l = *in++) { + while ((l = *in++) != '\0') { VALUE protocol; if (l > inlen) { ossl_raise(eSSLError, "Invalid protocol name list"); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/