From d7f66ba1ec8bf070fb171084f8d2ae5bc1f90311 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Sat, 11 Dec 2021 20:04:53 +0100 Subject: [PATCH] Remove strict aliasing warning in opengles2 backend --- src/render/opengles2/SDL_render_gles2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c index 4e6d1d600..44d5cb2fe 100644 --- a/src/render/opengles2/SDL_render_gles2.c +++ b/src/render/opengles2/SDL_render_gles2.c @@ -480,7 +480,7 @@ GLES2_CacheShader(GLES2_RenderData *data, GLES2_ShaderType type, GLenum shader_t { GLuint id; GLint compileSuccessful = GL_FALSE; - const Uint8 *shader_src = GLES2_GetShader(type); + const char *shader_src = (char *)GLES2_GetShader(type); if (!shader_src) { SDL_SetError("No shader src"); @@ -489,7 +489,7 @@ GLES2_CacheShader(GLES2_RenderData *data, GLES2_ShaderType type, GLenum shader_t /* Compile */ id = data->glCreateShader(shader_type); - data->glShaderSource(id, 1, (const char**)&shader_src, NULL); + data->glShaderSource(id, 1, &shader_src, NULL); data->glCompileShader(id); data->glGetShaderiv(id, GL_COMPILE_STATUS, &compileSuccessful);