From a4eb0dea863e4ae182c7bcd0562c161d6dfc25ad Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 14 Jun 2015 19:10:51 -0700 Subject: [PATCH] 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 | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c index 1e539ae751bca..7254cb7a33778 100644 --- a/src/render/opengles2/SDL_render_gles2.c +++ b/src/render/opengles2/SDL_render_gles2.c @@ -1030,9 +1030,6 @@ GLES2_CacheShader(SDL_Renderer *renderer, GLES2_ShaderType type, SDL_BlendMode b /* Find a matching shader instance that's supported on this hardware */ for (i = 0; i < shader->instance_count && !instance; ++i) { for (j = 0; j < data->shader_format_count && !instance; ++j) { - if (!shader->instances) { - continue; - } if (!shader->instances[i]) { continue; }