aboutsummaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-08 05:54:29 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-08 05:54:29 +0000
commit866862b147964ca964888e0335158247d9e74d4a (patch)
tree8bca2f5e0d95685f0afbb7b4cdd9e53196cc00ec /ext
parentc1c9c751fae9d6792f26ab206d0447c4d243fe3c (diff)
downloadruby-866862b147964ca964888e0335158247d9e74d4a.tar.gz
suppress warnings
* ext/date/date_parse.c (date_zone_to_diff): suppress parentheses warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/date/date_parse.c6
-rw-r--r--ext/openssl/ossl_ssl.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/date/date_parse.c b/ext/date/date_parse.c
index 68ae7a675c..17ce460877 100644
--- a/ext/date/date_parse.c
+++ b/ext/date/date_parse.c
@@ -530,13 +530,13 @@ date_zone_to_diff(VALUE str)
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
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index 8d057b79fa..09d8dd2453 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -589,7 +589,7 @@ ssl_npn_select_cb_common(VALUE cb, const unsigned char **out, unsigned char *out
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");