From 9e509e4a4fbd9b542f30fce2d591a75d622e8fac Mon Sep 17 00:00:00 2001 From: Sylvain Becker Date: Wed, 30 Oct 2019 16:45:53 +0100 Subject: [PATCH] SDL_render_gles2: remove ineffective widening cast warning: either cast from 'int' to 'size_t' (aka 'unsigned long') is ineffective, or there is loss of precision before the conversion [bugprone-misplaced-widening-cast] --- src/render/opengles2/SDL_render_gles2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c index e7425e4e3..3d76ae3f7 100644 --- a/src/render/opengles2/SDL_render_gles2.c +++ b/src/render/opengles2/SDL_render_gles2.c @@ -1812,7 +1812,7 @@ GLES2_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, int status; temp_pitch = rect->w * SDL_BYTESPERPIXEL(temp_format); - buflen = (size_t) (rect->h * temp_pitch); + buflen = rect->h * temp_pitch; if (buflen == 0) { return 0; /* nothing to do. */ }