From 09ee932e1a5f57155583c562f21e9bb0ed69e894 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 30 Mar 2022 20:24:14 -0700 Subject: [PATCH] WebP plugin: remove unnecessary casts --- plugin/webp/gvdevice_webp.c | 4 ++-- plugin/webp/gvloadimage_webp.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/webp/gvdevice_webp.c b/plugin/webp/gvdevice_webp.c index 573c63651..4331a8229 100644 --- a/plugin/webp/gvdevice_webp.c +++ b/plugin/webp/gvdevice_webp.c @@ -40,7 +40,7 @@ typedef enum { } format_type; static int writer(const uint8_t* data, size_t data_size, const WebPPicture* const pic) { - return (gvwrite((GVJ_t *)pic->custom_ptr, (const char *)data, data_size) == data_size) ? 1 : 0; + return (gvwrite(pic->custom_ptr, (const char *)data, data_size) == data_size) ? 1 : 0; } static void webp_format(GVJ_t * job) @@ -60,7 +60,7 @@ static void webp_format(GVJ_t * job) stride = 4 * job->width; picture.writer = writer; - picture.custom_ptr = (void*)job; + picture.custom_ptr = job; preset = WEBP_PRESET_DRAWING; diff --git a/plugin/webp/gvloadimage_webp.c b/plugin/webp/gvloadimage_webp.c index 7b4c10153..58a29bd30 100644 --- a/plugin/webp/gvloadimage_webp.c +++ b/plugin/webp/gvloadimage_webp.c @@ -159,7 +159,7 @@ static cairo_surface_t* webp_loadimage(GVJ_t * job, usershape_t *us) /* paint image into required location in graph */ static void webp_loadimage_cairo(GVJ_t * job, usershape_t *us, boxf b, bool filled) { - cairo_t *cr = (cairo_t *) job->context; /* target context */ + cairo_t *cr = job->context; /* target context */ cairo_surface_t *surface; /* source surface */ surface = webp_loadimage(job, us); -- 2.50.1