ruby-changes:53788
From: ko1 <ko1@a...>
Date: Tue, 27 Nov 2018 03:48:53 +0900 (JST)
Subject: [ruby-changes:53788] ko1:r66006 (trunk): fix for ansi-pedantic compile option.
ko1 2018-11-27 03:48:48 +0900 (Tue, 27 Nov 2018) New Revision: 66006 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66006 Log: fix for ansi-pedantic compile option. * iseq.c (iseq_add_local_tracepoint_i): extract aggregate initialization. See https://travis-ci.org/ruby/ruby/jobs/459881277 * iseq.c (iseq_remove_local_tracepoint_i): ditto. Modified files: trunk/iseq.c Index: iseq.c =================================================================== --- iseq.c (revision 66005) +++ iseq.c (revision 66006) @@ -3024,7 +3024,11 @@ iseq_add_local_tracepoint_i(const rb_ise https://github.com/ruby/ruby/blob/trunk/iseq.c#L3024 int rb_iseq_add_local_tracepoint_recursively(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval) { - struct trace_set_local_events_struct data = {turnon_events, tpval, 0}; + struct trace_set_local_events_struct data; + data.turnon_events = turnon_events; + data.tpval = tpval; + data.n = 0; + iseq_add_local_tracepoint_i(iseq, (void *)&data); if (0) rb_funcall(Qnil, rb_intern("puts"), 1, rb_iseq_disasm(iseq)); /* for debug */ return data.n; @@ -3075,7 +3079,10 @@ iseq_remove_local_tracepoint_i(const rb_ https://github.com/ruby/ruby/blob/trunk/iseq.c#L3079 int rb_iseq_remove_local_tracepoint_recursively(const rb_iseq_t *iseq, VALUE tpval) { - struct trace_clear_local_events_struct data = {tpval, 0}; + struct trace_clear_local_events_struct data; + data.tpval = tpval; + data.n = 0; + iseq_remove_local_tracepoint_i(iseq, (void *)&data); return data.n; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/