diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-08-08 17:23:56 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-08-09 11:21:56 +0900 |
commit | a14671a6b6ad69bab443df75a3472575e2cc0dbc (patch) | |
tree | d5e3017f7723aa711dc76b837a45fed1c4799fc1 /eval.c | |
parent | f584dc5a11d389a24a504b6066b74d1388f6164b (diff) |
Suppress warnings in C++2a
* bitwise operation between different enumeration types
('ruby_value_type' and 'ruby_fl_type') is deprecated
[-Wdeprecated-enum-enum-conversion]
* volatile-qualified parameter type 'volatile int' is deprecated
[-Wdeprecated-volatile]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4720
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -42,7 +42,7 @@ NORETURN(static void rb_raise_jump(VALUE, VALUE)); void rb_ec_clear_current_thread_trace_func(const rb_execution_context_t *ec); void rb_ec_clear_all_trace_func(const rb_execution_context_t *ec); -static int rb_ec_cleanup(rb_execution_context_t *ec, volatile int ex); +static int rb_ec_cleanup(rb_execution_context_t *ec, int ex); static int rb_ec_exec_node(rb_execution_context_t *ec, void *n); VALUE rb_eLocalJumpError; @@ -210,13 +210,13 @@ ruby_finalize(void) * @note This function does not raise any exception. */ int -ruby_cleanup(volatile int ex) +ruby_cleanup(int ex) { return rb_ec_cleanup(GET_EC(), ex); } static int -rb_ec_cleanup(rb_execution_context_t *ec, volatile int ex) +rb_ec_cleanup(rb_execution_context_t *ec, int ex0) { int state; volatile VALUE errs[2] = { Qundef, Qundef }; @@ -225,6 +225,7 @@ rb_ec_cleanup(rb_execution_context_t *ec, volatile int ex) rb_thread_t *const volatile th0 = th; volatile int sysex = EXIT_SUCCESS; volatile int step = 0; + volatile int ex = ex0; rb_threadptr_interrupt(th); rb_threadptr_check_signal(th); |