opengles: Fixed compiler warnings.
authorRyan C. Gordon
Sat, 17 Nov 2018 16:24:52 -0500
changeset 1241803fc24848a71
parent 12417 4cdd74f3992c
child 12419 8fd9d8eeb968
opengles: Fixed compiler warnings.
src/render/opengles/SDL_render_gles.c
     1.1 --- a/src/render/opengles/SDL_render_gles.c	Sat Nov 17 12:12:29 2018 -0800
     1.2 +++ b/src/render/opengles/SDL_render_gles.c	Sat Nov 17 16:24:52 2018 -0500
     1.3 @@ -723,8 +723,8 @@
     1.4                           viewport->w, viewport->h);
     1.5          if (viewport->w && viewport->h) {
     1.6              data->glOrthof((GLfloat) 0, (GLfloat) viewport->w,
     1.7 -                           (GLfloat) istarget ? 0 : viewport->h,
     1.8 -                           (GLfloat) istarget ? viewport->h : 0,
     1.9 +                           (GLfloat) (istarget ? 0 : viewport->h),
    1.10 +                           (GLfloat) (istarget ? viewport->h : 0),
    1.11                             0.0, 1.0);
    1.12          }
    1.13          data->glMatrixMode(GL_MODELVIEW);
    1.14 @@ -874,7 +874,7 @@
    1.15                  const GLfloat *verts = (GLfloat *) (((Uint8 *) vertices) + cmd->data.draw.first);
    1.16                  SetDrawState(data, cmd);
    1.17                  data->glVertexPointer(2, GL_FLOAT, 0, verts);
    1.18 -                data->glDrawArrays(GL_POINTS, 0, count);
    1.19 +                data->glDrawArrays(GL_POINTS, 0, (GLsizei) count);
    1.20                  break;
    1.21              }
    1.22  
    1.23 @@ -885,11 +885,11 @@
    1.24                  data->glVertexPointer(2, GL_FLOAT, 0, verts);
    1.25                  if (count > 2 && (verts[0] == verts[(count-1)*2]) && (verts[1] == verts[(count*2)-1])) {
    1.26                      /* GL_LINE_LOOP takes care of the final segment */
    1.27 -                    data->glDrawArrays(GL_LINE_LOOP, 0, count - 1);
    1.28 +                    data->glDrawArrays(GL_LINE_LOOP, 0, (GLsizei) (count - 1));
    1.29                  } else {
    1.30 -                    data->glDrawArrays(GL_LINE_STRIP, 0, count);
    1.31 +                    data->glDrawArrays(GL_LINE_STRIP, 0, (GLsizei) count);
    1.32                      /* We need to close the endpoint of the line */
    1.33 -                    data->glDrawArrays(GL_POINTS, count - 1, 1);
    1.34 +                    data->glDrawArrays(GL_POINTS, (GLsizei) (count - 1), 1);
    1.35                  }
    1.36                  break;
    1.37              }
    1.38 @@ -897,7 +897,7 @@
    1.39              case SDL_RENDERCMD_FILL_RECTS: {
    1.40                  const size_t count = cmd->data.draw.count;
    1.41                  const GLfloat *verts = (GLfloat *) (((Uint8 *) vertices) + cmd->data.draw.first);
    1.42 -                size_t offset = 0;
    1.43 +                GLsizei offset = 0;
    1.44                  SetDrawState(data, cmd);
    1.45                  data->glVertexPointer(2, GL_FLOAT, 0, verts);
    1.46                  for (i = 0; i < count; ++i, offset += 4) {
    1.47 @@ -1073,7 +1073,7 @@
    1.48      return 0;
    1.49  }
    1.50  
    1.51 -SDL_Renderer *
    1.52 +static SDL_Renderer *
    1.53  GLES_CreateRenderer(SDL_Window * window, Uint32 flags)
    1.54  {
    1.55      SDL_Renderer *renderer;
    1.56 @@ -1228,7 +1228,8 @@
    1.57       1,
    1.58       {SDL_PIXELFORMAT_ABGR8888},
    1.59       0,
    1.60 -     0}
    1.61 +     0
    1.62 +    }
    1.63  };
    1.64  
    1.65  #endif /* SDL_VIDEO_RENDER_OGL_ES && !SDL_RENDER_DISABLED */