mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 10:35:38 +00:00
Pacify some GCC strict-aliasing compiler warnings.
This commit is contained in:
parent
5232b8e952
commit
e93e91f0b5
|
@ -493,7 +493,7 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags)
|
||||||
PFNGLDEBUGMESSAGECALLBACKARBPROC glDebugMessageCallbackARBFunc = (PFNGLDEBUGMESSAGECALLBACKARBPROC) SDL_GL_GetProcAddress("glDebugMessageCallbackARB");
|
PFNGLDEBUGMESSAGECALLBACKARBPROC glDebugMessageCallbackARBFunc = (PFNGLDEBUGMESSAGECALLBACKARBPROC) SDL_GL_GetProcAddress("glDebugMessageCallbackARB");
|
||||||
|
|
||||||
data->GL_ARB_debug_output_supported = SDL_TRUE;
|
data->GL_ARB_debug_output_supported = SDL_TRUE;
|
||||||
data->glGetPointerv(GL_DEBUG_CALLBACK_FUNCTION_ARB, (GLvoid **)&data->next_error_callback);
|
data->glGetPointerv(GL_DEBUG_CALLBACK_FUNCTION_ARB, (GLvoid **)(char *)&data->next_error_callback);
|
||||||
data->glGetPointerv(GL_DEBUG_CALLBACK_USER_PARAM_ARB, &data->next_error_userparam);
|
data->glGetPointerv(GL_DEBUG_CALLBACK_USER_PARAM_ARB, &data->next_error_userparam);
|
||||||
glDebugMessageCallbackARBFunc(GL_HandleDebugMessage, renderer);
|
glDebugMessageCallbackARBFunc(GL_HandleDebugMessage, renderer);
|
||||||
|
|
||||||
|
|
|
@ -1068,7 +1068,7 @@ GLES2_CacheShader(SDL_Renderer *renderer, GLES2_ShaderType type, SDL_BlendMode b
|
||||||
/* Compile or load the selected shader instance */
|
/* Compile or load the selected shader instance */
|
||||||
entry->id = data->glCreateShader(instance->type);
|
entry->id = data->glCreateShader(instance->type);
|
||||||
if (instance->format == (GLenum)-1) {
|
if (instance->format == (GLenum)-1) {
|
||||||
data->glShaderSource(entry->id, 1, (const char **)&instance->data, NULL);
|
data->glShaderSource(entry->id, 1, (const char **)(char *)&instance->data, NULL);
|
||||||
data->glCompileShader(entry->id);
|
data->glCompileShader(entry->id);
|
||||||
data->glGetShaderiv(entry->id, GL_COMPILE_STATUS, &compileSuccessful);
|
data->glGetShaderiv(entry->id, GL_COMPILE_STATUS, &compileSuccessful);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -234,10 +234,10 @@ void
|
||||||
SDL_FreeShapeTree(SDL_ShapeTree** shape_tree)
|
SDL_FreeShapeTree(SDL_ShapeTree** shape_tree)
|
||||||
{
|
{
|
||||||
if((*shape_tree)->kind == QuadShape) {
|
if((*shape_tree)->kind == QuadShape) {
|
||||||
SDL_FreeShapeTree((SDL_ShapeTree **)&(*shape_tree)->data.children.upleft);
|
SDL_FreeShapeTree((SDL_ShapeTree **)(char*)&(*shape_tree)->data.children.upleft);
|
||||||
SDL_FreeShapeTree((SDL_ShapeTree **)&(*shape_tree)->data.children.upright);
|
SDL_FreeShapeTree((SDL_ShapeTree **)(char*)&(*shape_tree)->data.children.upright);
|
||||||
SDL_FreeShapeTree((SDL_ShapeTree **)&(*shape_tree)->data.children.downleft);
|
SDL_FreeShapeTree((SDL_ShapeTree **)(char*)&(*shape_tree)->data.children.downleft);
|
||||||
SDL_FreeShapeTree((SDL_ShapeTree **)&(*shape_tree)->data.children.downright);
|
SDL_FreeShapeTree((SDL_ShapeTree **)(char*)&(*shape_tree)->data.children.downright);
|
||||||
}
|
}
|
||||||
SDL_free(*shape_tree);
|
SDL_free(*shape_tree);
|
||||||
*shape_tree = NULL;
|
*shape_tree = NULL;
|
||||||
|
|
Loading…
Reference in a new issue