Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

fix compile error: warning as error #135

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ext/mathematical/mathematical.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ VALUE process(VALUE self, unsigned long maxsize, const char *latex_code, unsigne
cairo_surface_t *surface;

if (format == FORMAT_SVG) {
surface = cairo_svg_surface_create_for_stream (cairoSvgSurfaceCallback, self, width_pt, height_pt);
surface = cairo_svg_surface_create_for_stream (cairoSvgSurfaceCallback, (VALUE*)self, width_pt, height_pt);
} else if (format == FORMAT_PNG) {
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
}
Expand All @@ -146,7 +146,7 @@ VALUE process(VALUE self, unsigned long maxsize, const char *latex_code, unsigne

switch (format) {
case FORMAT_PNG:
cairo_surface_write_to_png_stream (cairo_get_target (cairo), cairoPngSurfaceCallback, self);
cairo_surface_write_to_png_stream (cairo_get_target (cairo), cairoPngSurfaceCallback, (VALUE*)self);
break;
default:
break;
Expand Down Expand Up @@ -229,7 +229,7 @@ static VALUE MATHEMATICAL_process(VALUE self, VALUE rb_Input, VALUE rb_ParseType
args[4] = rb_iv_get(self, "@delimiter");
args[5] = rb_ParseType;

output = rb_rescue(process_helper, args, process_rescue, rb_Input);
output = rb_rescue(process_helper, (VALUE)args, process_rescue, rb_Input);
break;
}
case T_ARRAY: {
Expand All @@ -253,7 +253,7 @@ static VALUE MATHEMATICAL_process(VALUE self, VALUE rb_Input, VALUE rb_ParseType
args[4] = rb_iv_get(self, "@delimiter");
args[5] = rb_ParseType;

hash = rb_rescue(process_helper, args, process_rescue, math);
hash = rb_rescue(process_helper, (VALUE)args, process_rescue, math);

rb_ary_store(output, i, hash);
}
Expand All @@ -262,7 +262,7 @@ static VALUE MATHEMATICAL_process(VALUE self, VALUE rb_Input, VALUE rb_ParseType
default: {
/* should be impossible, Ruby code prevents this */
print_and_raise(rb_eTypeError, "not valid value");
output = NULL;
output = (VALUE)NULL;
break;
}
}
Expand Down
Loading