diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2021-08-16 18:23:17 +0930 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2021-08-22 12:07:36 +0930 |
commit | ba3823e6b82c76bfe962f570dbf48e7c6a8126a6 (patch) | |
tree | c71766c03eabf1d5d923f93f4216db1c91f3e245 /src/cairo-path-fixed.c | |
parent | 2dec76ddfe9499b5a6efc1ccc8e52536a314543b (diff) | |
download | cairo-ba3823e6b82c76bfe962f570dbf48e7c6a8126a6.tar.gz |
Fix cast between incompatible function types warnings
warning: cast between incompatible function types from ‘cairo_status_t (*)(void *, const cairo_point_t *)’ {aka ‘enum _cairo_status (*)(void *, const struct _cairo_point *)’} to ‘cairo_status_t (*)(void *, const cairo_point_t *, const cairo_slope_t *)’ {aka ‘enum _cairo_status (*)(void *, const struct _cairo_point *, const struct _cairo_slope *)’} [-Wcast-function-type]
Diffstat (limited to 'src/cairo-path-fixed.c')
-rw-r--r-- | src/cairo-path-fixed.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/cairo-path-fixed.c b/src/cairo-path-fixed.c index a6ab4e389..fc146f3b3 100644 --- a/src/cairo-path-fixed.c +++ b/src/cairo-path-fixed.c @@ -1135,6 +1135,14 @@ _cpf_line_to (void *closure, } static cairo_status_t +_cpf_add_point (void *closure, + const cairo_point_t *point, + const cairo_slope_t *tangent) +{ + return _cpf_line_to (closure, point); +}; + +static cairo_status_t _cpf_curve_to (void *closure, const cairo_point_t *p1, const cairo_point_t *p2, @@ -1146,8 +1154,8 @@ _cpf_curve_to (void *closure, cairo_point_t *p0 = &cpf->current_point; if (! _cairo_spline_init (&spline, - (cairo_spline_add_point_func_t)cpf->line_to, - cpf->closure, + _cpf_add_point, + cpf, p0, p1, p2, p3)) { return _cpf_line_to (closure, p3); |