Skip to content

Commit 01b23fa

Browse files
noburhenium
authored andcommitted
Remove -Wno-parentheses flag.
[Fix GH-1958] From: Jun Aruga <jaruga@redhat.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e * expand tabs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e Suppress more -Wparentheses warnings [Fix GH-1958] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e [ky: this is a combined patch of r64806-r64808.] Sync-with-trunk: r64808
1 parent 959b1d7 commit 01b23fa

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

ext/openssl/openssl_missing.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ IMPL_KEY_ACCESSOR3(DSA, pqg, p, q, g, (p == obj->p || q == obj->q || g == obj->g
185185
#if !defined(OPENSSL_NO_DH)
186186
IMPL_PKEY_GETTER(DH, dh)
187187
IMPL_KEY_ACCESSOR2(DH, key, pub_key, priv_key, (pub_key == obj->pub_key || (obj->priv_key && priv_key == obj->priv_key)))
188-
IMPL_KEY_ACCESSOR3(DH, pqg, p, q, g, (p == obj->p || obj->q && q == obj->q || g == obj->g))
188+
IMPL_KEY_ACCESSOR3(DH, pqg, p, q, g, (p == obj->p || (obj->q && q == obj->q) || g == obj->g))
189189
static inline ENGINE *DH_get0_engine(DH *dh) { return dh->engine; }
190190
#endif
191191

ext/openssl/ossl_pkey.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ static VALUE ossl_##_keytype##_set_##_group(VALUE self, VALUE v1, VALUE v2, VALU
133133
BIGNUM *bn3 = NULL, *orig_bn3 = NIL_P(v3) ? NULL : GetBNPtr(v3);\
134134
\
135135
Get##_type(self, obj); \
136-
if (orig_bn1 && !(bn1 = BN_dup(orig_bn1)) || \
137-
orig_bn2 && !(bn2 = BN_dup(orig_bn2)) || \
138-
orig_bn3 && !(bn3 = BN_dup(orig_bn3))) { \
136+
if ((orig_bn1 && !(bn1 = BN_dup(orig_bn1))) || \
137+
(orig_bn2 && !(bn2 = BN_dup(orig_bn2))) || \
138+
(orig_bn3 && !(bn3 = BN_dup(orig_bn3)))) { \
139139
BN_clear_free(bn1); \
140140
BN_clear_free(bn2); \
141141
BN_clear_free(bn3); \
@@ -163,8 +163,8 @@ static VALUE ossl_##_keytype##_set_##_group(VALUE self, VALUE v1, VALUE v2) \
163163
BIGNUM *bn2 = NULL, *orig_bn2 = NIL_P(v2) ? NULL : GetBNPtr(v2);\
164164
\
165165
Get##_type(self, obj); \
166-
if (orig_bn1 && !(bn1 = BN_dup(orig_bn1)) || \
167-
orig_bn2 && !(bn2 = BN_dup(orig_bn2))) { \
166+
if ((orig_bn1 && !(bn1 = BN_dup(orig_bn1))) || \
167+
(orig_bn2 && !(bn2 = BN_dup(orig_bn2)))) { \
168168
BN_clear_free(bn1); \
169169
BN_clear_free(bn2); \
170170
ossl_raise(eBNError, NULL); \

ext/openssl/ossl_pkey_dh.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ ossl_dh_initialize_copy(VALUE self, VALUE other)
262262
BIGNUM *pub2 = BN_dup(pub);
263263
BIGNUM *priv2 = BN_dup(priv);
264264

265-
if (!pub2 || priv && !priv2) {
265+
if (!pub2 || (priv && !priv2)) {
266266
BN_clear_free(pub2);
267267
BN_clear_free(priv2);
268268
ossl_raise(eDHError, "BN_dup");

ext/openssl/ossl_ssl.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,10 @@ ossl_sslctx_set_minmax_proto_version(VALUE self, VALUE min_v, VALUE max_v)
184184

185185
for (i = 0; i < numberof(options_map); i++) {
186186
sum |= options_map[i].opts;
187-
if (min && min > options_map[i].ver || max && max < options_map[i].ver)
187+
if ((min && min > options_map[i].ver) ||
188+
(max && max < options_map[i].ver)) {
188189
opts |= options_map[i].opts;
190+
}
189191
}
190192
SSL_CTX_clear_options(ctx, sum);
191193
SSL_CTX_set_options(ctx, opts);

ext/openssl/ossl_x509name.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ x509name_print(VALUE self, unsigned long iflag)
270270
if (!out)
271271
ossl_raise(eX509NameError, NULL);
272272
ret = X509_NAME_print_ex(out, name, 0, iflag);
273-
if (ret < 0 || iflag == XN_FLAG_COMPAT && ret == 0) {
273+
if (ret < 0 || (iflag == XN_FLAG_COMPAT && ret == 0)) {
274274
BIO_free(out);
275275
ossl_raise(eX509NameError, "X509_NAME_print_ex");
276276
}

0 commit comments

Comments
 (0)