Skip to content

Commit

Permalink
gtk3: fix a wrong type warning
Browse files Browse the repository at this point in the history
    compiling rb-gtk3-spin-button.c
    rb-gtk3-spin-button.c:70:15: warning: incompatible function pointer types passing 'VALUE (VALUE)' (aka 'unsigned long (unsigned long)') to parameter of type 'VALUE (*)(VALUE, VALUE)' (aka 'unsigned long (*)(unsigned long, unsigned long)') [-Wincompatible-function-pointer-types]
                  rb_gtk3_spin_button_input_rescue, (VALUE)&input_data);
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/runner/hostedtoolcache/Ruby/3.2.2/x64/include/ruby-3.2.0/ruby/internal/iterator.h:364:62: note: passing argument to parameter 'r_proc' here
    VALUE rb_rescue(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*r_proc)(VALUE, VALUE), VALUE data2);
                                                                 ^

Reported by MATSUMOTO Katsuyoshi. Thanks!!!
  • Loading branch information
kou committed Aug 19, 2023
1 parent 27d9c63 commit c196bf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gtk3/ext/gtk3/rb-gtk3-spin-button.c
Expand Up @@ -46,7 +46,7 @@ rb_gtk3_spin_button_input_body(VALUE user_data)
}

static VALUE
rb_gtk3_spin_button_input_rescue(VALUE user_data)
rb_gtk3_spin_button_input_rescue(VALUE user_data, VALUE error)
{
InputData *input_data = (InputData *)user_data;
g_value_set_int(input_data->data->return_value, GTK_INPUT_ERROR);
Expand Down

0 comments on commit c196bf1

Please sign in to comment.