SDL_render_gles2: remove ineffective widening cast
authorSylvain Becker <sylvain.becker@gmail.com>
Wed, 30 Oct 2019 16:45:53 +0100
changeset 132084389d1796f6d
parent 13207 8340a18b20bf
child 13209 f872396dcc58
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
     1.1 --- a/src/render/opengles2/SDL_render_gles2.c	Wed Oct 30 16:33:32 2019 +0100
     1.2 +++ b/src/render/opengles2/SDL_render_gles2.c	Wed Oct 30 16:45:53 2019 +0100
     1.3 @@ -1812,7 +1812,7 @@
     1.4      int status;
     1.5  
     1.6      temp_pitch = rect->w * SDL_BYTESPERPIXEL(temp_format);
     1.7 -    buflen = (size_t) (rect->h * temp_pitch);
     1.8 +    buflen = rect->h * temp_pitch;
     1.9      if (buflen == 0) {
    1.10          return 0;  /* nothing to do. */
    1.11      }