1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2018-09-21 10:19:10 +00:00
parent 2617dfa9bd
commit 7e9ee35fb8
8 changed files with 13 additions and 13 deletions

View file

@ -471,7 +471,7 @@ AS_IF([test "$GCC:${warnflags+set}:no" = yes::no], [
AS_IF([test $icc_version -gt 0], [ AS_IF([test $icc_version -gt 0], [
particular_werror_flags=no particular_werror_flags=no
]) ])
for wflag in -Wno-unused-parameter -Wno-parentheses -Wno-long-long \ for wflag in -Wno-unused-parameter -Wno-long-long \
-diag-disable=175,188,2259 \ -diag-disable=175,188,2259 \
-Wno-missing-field-initializers \ -Wno-missing-field-initializers \
-Wno-tautological-compare \ -Wno-tautological-compare \

View file

@ -133,9 +133,9 @@ static VALUE ossl_##_keytype##_set_##_group(VALUE self, VALUE v1, VALUE v2, VALU
BIGNUM *bn3 = NULL, *orig_bn3 = NIL_P(v3) ? NULL : GetBNPtr(v3);\ BIGNUM *bn3 = NULL, *orig_bn3 = NIL_P(v3) ? NULL : GetBNPtr(v3);\
\ \
Get##_type(self, obj); \ Get##_type(self, obj); \
if (orig_bn1 && !(bn1 = BN_dup(orig_bn1)) || \ if ((orig_bn1 && !(bn1 = BN_dup(orig_bn1))) || \
orig_bn2 && !(bn2 = BN_dup(orig_bn2)) || \ (orig_bn2 && !(bn2 = BN_dup(orig_bn2))) || \
orig_bn3 && !(bn3 = BN_dup(orig_bn3))) { \ (orig_bn3 && !(bn3 = BN_dup(orig_bn3)))) { \
BN_clear_free(bn1); \ BN_clear_free(bn1); \
BN_clear_free(bn2); \ BN_clear_free(bn2); \
BN_clear_free(bn3); \ BN_clear_free(bn3); \
@ -163,8 +163,8 @@ static VALUE ossl_##_keytype##_set_##_group(VALUE self, VALUE v1, VALUE v2) \
BIGNUM *bn2 = NULL, *orig_bn2 = NIL_P(v2) ? NULL : GetBNPtr(v2);\ BIGNUM *bn2 = NULL, *orig_bn2 = NIL_P(v2) ? NULL : GetBNPtr(v2);\
\ \
Get##_type(self, obj); \ Get##_type(self, obj); \
if (orig_bn1 && !(bn1 = BN_dup(orig_bn1)) || \ if ((orig_bn1 && !(bn1 = BN_dup(orig_bn1))) || \
orig_bn2 && !(bn2 = BN_dup(orig_bn2))) { \ (orig_bn2 && !(bn2 = BN_dup(orig_bn2)))) { \
BN_clear_free(bn1); \ BN_clear_free(bn1); \
BN_clear_free(bn2); \ BN_clear_free(bn2); \
ossl_raise(eBNError, NULL); \ ossl_raise(eBNError, NULL); \

View file

@ -262,7 +262,7 @@ ossl_dh_initialize_copy(VALUE self, VALUE other)
BIGNUM *pub2 = BN_dup(pub); BIGNUM *pub2 = BN_dup(pub);
BIGNUM *priv2 = BN_dup(priv); BIGNUM *priv2 = BN_dup(priv);
if (!pub2 || priv && !priv2) { if (!pub2 || (priv && !priv2)) {
BN_clear_free(pub2); BN_clear_free(pub2);
BN_clear_free(priv2); BN_clear_free(priv2);
ossl_raise(eDHError, "BN_dup"); ossl_raise(eDHError, "BN_dup");

View file

@ -270,7 +270,7 @@ x509name_print(VALUE self, unsigned long iflag)
if (!out) if (!out)
ossl_raise(eX509NameError, NULL); ossl_raise(eX509NameError, NULL);
ret = X509_NAME_print_ex(out, name, 0, iflag); ret = X509_NAME_print_ex(out, name, 0, iflag);
if (ret < 0 || iflag == XN_FLAG_COMPAT && ret == 0) { if (ret < 0 || (iflag == XN_FLAG_COMPAT && ret == 0)) {
BIO_free(out); BIO_free(out);
ossl_raise(eX509NameError, "X509_NAME_print_ex"); ossl_raise(eX509NameError, "X509_NAME_print_ex");
} }

View file

@ -1094,7 +1094,7 @@ convert_unit_to_func(struct rb_mjit_unit *unit)
success = compile_c_to_so(c_file, so_file); success = compile_c_to_so(c_file, so_file);
#else #else
/* splitting .c -> .o step and .o -> .so step, to cache .o files in the future */ /* splitting .c -> .o step and .o -> .so step, to cache .o files in the future */
if (success = compile_c_to_o(c_file, o_file)) { if ((success = compile_c_to_o(c_file, o_file)) != 0) {
const char *o_files[2] = { NULL, NULL }; const char *o_files[2] = { NULL, NULL };
o_files[0] = o_file; o_files[0] = o_file;
success = link_o_to_so(o_files, so_file); success = link_o_to_so(o_files, so_file);

2
re.c
View file

@ -95,7 +95,7 @@ rb_memsearch_ss(const unsigned char *xs, long m, const unsigned char *ys, long n
{ {
const unsigned char *y; const unsigned char *y;
if (y = memmem(ys, n, xs, m)) if ((y = memmem(ys, n, xs, m)) != NULL)
return y - ys; return y - ys;
else else
return -1; return -1;

View file

@ -886,7 +886,7 @@ check_stack_overflow(int sig, const uintptr_t addr, const ucontext_t *ctx)
/* SP in ucontext is not decremented yet when `push` failed, so /* SP in ucontext is not decremented yet when `push` failed, so
* the fault page can be the next. */ * the fault page can be the next. */
if (sp_page == fault_page || sp_page == fault_page + 1 || if (sp_page == fault_page || sp_page == fault_page + 1 ||
sp_page <= fault_page && fault_page <= bp_page) { (sp_page <= fault_page && fault_page <= bp_page)) {
rb_execution_context_t *ec = GET_EC(); rb_execution_context_t *ec = GET_EC();
int crit = FALSE; int crit = FALSE;
if ((uintptr_t)ec->tag->buf / pagesize <= fault_page + 1) { if ((uintptr_t)ec->tag->buf / pagesize <= fault_page + 1) {

View file

@ -3868,7 +3868,7 @@ vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE *p
VM_ASSERT(vm_event_flags & events); VM_ASSERT(vm_event_flags & events);
/* increment PC because source line is calculated with PC-1 */ /* increment PC because source line is calculated with PC-1 */
if (event = (events & (RUBY_EVENT_CLASS | RUBY_EVENT_CALL | RUBY_EVENT_B_CALL))) { if ((event = (events & (RUBY_EVENT_CLASS | RUBY_EVENT_CALL | RUBY_EVENT_B_CALL))) != 0) {
VM_ASSERT(event == RUBY_EVENT_CLASS || VM_ASSERT(event == RUBY_EVENT_CLASS ||
event == RUBY_EVENT_CALL || event == RUBY_EVENT_CALL ||
event == RUBY_EVENT_B_CALL); event == RUBY_EVENT_B_CALL);
@ -3889,7 +3889,7 @@ vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE *p
EXEC_EVENT_HOOK(ec, RUBY_EVENT_COVERAGE_LINE, GET_SELF(), 0, 0, 0, Qundef); EXEC_EVENT_HOOK(ec, RUBY_EVENT_COVERAGE_LINE, GET_SELF(), 0, 0, 0, Qundef);
reg_cfp->pc--; reg_cfp->pc--;
} }
if (event = (events & (RUBY_EVENT_END | RUBY_EVENT_RETURN | RUBY_EVENT_B_RETURN))) { if ((event = (events & (RUBY_EVENT_END | RUBY_EVENT_RETURN | RUBY_EVENT_B_RETURN))) != 0) {
VM_ASSERT(event == RUBY_EVENT_END || VM_ASSERT(event == RUBY_EVENT_END ||
event == RUBY_EVENT_RETURN || event == RUBY_EVENT_RETURN ||
event == RUBY_EVENT_B_RETURN); event == RUBY_EVENT_B_RETURN);