summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-21 10:31:11 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-21 10:31:11 +0000
commit0d95805c2ee6d6bbd42a71e7b82da1618b289b5c (patch)
tree5d9ac85359338150d3eec142aabcb9a395498340 /ext
parent2def52500f89ac0b0a21dd92baafd2ca198cd8dd (diff)
downloadruby-0d95805c2ee6d6bbd42a71e7b82da1618b289b5c.tar.gz
Suppress more -Wparentheses warnings
[Fix GH-1958] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/openssl/openssl_missing.h2
-rw-r--r--ext/openssl/ossl_ssl.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/ext/openssl/openssl_missing.h b/ext/openssl/openssl_missing.h
index 69a7df71d0..09998214e1 100644
--- a/ext/openssl/openssl_missing.h
+++ b/ext/openssl/openssl_missing.h
@@ -185,7 +185,7 @@ IMPL_KEY_ACCESSOR3(DSA, pqg, p, q, g, (p == obj->p || q == obj->q || g == obj->g
#if !defined(OPENSSL_NO_DH)
IMPL_PKEY_GETTER(DH, dh)
IMPL_KEY_ACCESSOR2(DH, key, pub_key, priv_key, (pub_key == obj->pub_key || (obj->priv_key && priv_key == obj->priv_key)))
-IMPL_KEY_ACCESSOR3(DH, pqg, p, q, g, (p == obj->p || obj->q && q == obj->q || g == obj->g))
+IMPL_KEY_ACCESSOR3(DH, pqg, p, q, g, (p == obj->p || (obj->q && q == obj->q) || g == obj->g))
static inline ENGINE *DH_get0_engine(DH *dh) { return dh->engine; }
#endif
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index a85be17f07..7996f227b6 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -184,8 +184,10 @@ ossl_sslctx_set_minmax_proto_version(VALUE self, VALUE min_v, VALUE max_v)
for (i = 0; i < numberof(options_map); i++) {
sum |= options_map[i].opts;
- if (min && min > options_map[i].ver || max && max < options_map[i].ver)
+ if ((min && min > options_map[i].ver) ||
+ (max && max < options_map[i].ver)) {
opts |= options_map[i].opts;
+ }
}
SSL_CTX_clear_options(ctx, sum);
SSL_CTX_set_options(ctx, opts);