From 772f7708902aa51b3dff9d58f45b8c21b730e84f Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Fri, 26 Nov 2021 09:53:43 -0800 Subject: [PATCH] gd plugin: remove unnecessary casts around 'us->data' --- plugin/gd/gvloadimage_gd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugin/gd/gvloadimage_gd.c b/plugin/gd/gvloadimage_gd.c index 5770f9e96..5c82971df 100644 --- a/plugin/gd/gvloadimage_gd.c +++ b/plugin/gd/gvloadimage_gd.c @@ -31,7 +31,7 @@ typedef enum { static void gd_freeimage(usershape_t *us) { - gdImageDestroy((gdImagePtr)us->data); + gdImageDestroy(us->data); } static gdImagePtr gd_loadimage(GVJ_t * job, usershape_t *us) @@ -61,28 +61,28 @@ static gdImagePtr gd_loadimage(GVJ_t * job, usershape_t *us) #endif #ifdef HAVE_GD_PNG case FT_PNG: - us->data = (void*)gdImageCreateFromPng(us->f); + us->data = gdImageCreateFromPng(us->f); break; #endif #ifdef HAVE_GD_GIF case FT_GIF: - us->data = (void*)gdImageCreateFromGif(us->f); + us->data = gdImageCreateFromGif(us->f); break; #endif #ifdef HAVE_GD_JPEG case FT_JPEG: - us->data = (void*)gdImageCreateFromJpeg(us->f); + us->data = gdImageCreateFromJpeg(us->f); break; #endif #if 0 #ifdef HAVE_GD_XPM case FT_XPM: - us->data = (void*)gdImageCreateFromXpm(us->f); + us->data = gdImageCreateFromXpm(us->f); break; #endif #ifdef HAVE_GD_WBMP case FT_WBMP: - us->data = (void*)gdImageCreateFromWbmp(us->f); + us->data = gdImageCreateFromWbmp(us->f); break; #endif #endif @@ -94,7 +94,7 @@ static gdImagePtr gd_loadimage(GVJ_t * job, usershape_t *us) gvusershape_file_release(us); } - return (gdImagePtr)(us->data); + return us->data; } static gdImagePtr gd_rotateimage(gdImagePtr im, int rotation) -- 2.40.0