Fixed bug 2908 - Fix clang warnings
authorSam Lantinga <slouken@libsdl.org>
Sun, 14 Jun 2015 19:10:51 -0700
changeset 9739306e09b65660
parent 9738 32c934d0cb29
child 9740 55e88e3bc7cc
Fixed bug 2908 - Fix clang warnings

Simon Deschenes

My build system still shows warning as errors.

The first warning says that the member named instances can never be false (or NULL) as it is a static array, and we should check for instances[index] which we do anyway.
src/render/opengles2/SDL_render_gles2.c
     1.1 --- a/src/render/opengles2/SDL_render_gles2.c	Sun Jun 14 18:57:05 2015 -0700
     1.2 +++ b/src/render/opengles2/SDL_render_gles2.c	Sun Jun 14 19:10:51 2015 -0700
     1.3 @@ -1030,9 +1030,6 @@
     1.4      /* Find a matching shader instance that's supported on this hardware */
     1.5      for (i = 0; i < shader->instance_count && !instance; ++i) {
     1.6          for (j = 0; j < data->shader_format_count && !instance; ++j) {
     1.7 -            if (!shader->instances) {
     1.8 -                continue;
     1.9 -            }
    1.10              if (!shader->instances[i]) {
    1.11                  continue;
    1.12              }