Patch from Sylvain to fix clang warnings

This commit is contained in:
Sam Lantinga 2016-11-13 22:57:41 -08:00
parent 460360285a
commit dae32409e9
50 changed files with 285 additions and 167 deletions

View file

@ -34,7 +34,7 @@ typedef enum {
typedef struct GL_ShaderContext GL_ShaderContext;
extern GL_ShaderContext * GL_CreateShaderContext();
extern GL_ShaderContext * GL_CreateShaderContext(void);
extern void GL_SelectShader(GL_ShaderContext *ctx, GL_Shader shader);
extern void GL_DestroyShaderContext(GL_ShaderContext *ctx);

View file

@ -214,7 +214,7 @@ static int GLES_LoadFunctions(GLES_RenderData * data)
static SDL_GLContext SDL_CurrentContext = NULL;
GLES_FBOList *
static GLES_FBOList *
GLES_GetFBO(GLES_RenderData *data, Uint32 w, Uint32 h)
{
GLES_FBOList *result = data->framebuffers;

View file

@ -307,7 +307,7 @@ static int GLES2_LoadFunctions(GLES2_DriverContext * data)
return 0;
}
GLES2_FBOList *
static GLES2_FBOList *
GLES2_GetFBO(GLES2_DriverContext *data, Uint32 w, Uint32 h)
{
GLES2_FBOList *result = data->framebuffers;
@ -1923,7 +1923,9 @@ static int GLES2_UnbindTexture (SDL_Renderer * renderer, SDL_Texture *texture)
* Renderer instantiation *
*************************************************************************************************/
#ifdef ZUNE_HD
#define GL_NVIDIA_PLATFORM_BINARY_NV 0x890B
#endif
static void
GLES2_ResetState(SDL_Renderer *renderer)
@ -1963,7 +1965,7 @@ GLES2_CreateRenderer(SDL_Window *window, Uint32 flags)
#ifndef ZUNE_HD
GLboolean hasCompiler;
#endif
Uint32 window_flags;
Uint32 window_flags = 0; /* -Wconditional-uninitialized */
GLint window_framebuffer;
GLint value;
int profile_mask = 0, major = 0, minor = 0;

View file

@ -245,7 +245,7 @@ SDL_BlendFillRect(SDL_Surface * dst, const SDL_Rect * rect,
} else {
return SDL_BlendFillRect_ARGB8888(dst, rect, blendMode, r, g, b, a);
}
break;
/* break; -Wunreachable-code-break */
}
break;
default:

View file

@ -685,7 +685,7 @@ SDL_CalculateBlendLineFunc(const SDL_PixelFormat * fmt)
} else {
return SDL_BlendLine_RGB2;
}
break;
/* break; -Wunreachable-code-break */
case 4:
if (fmt->Rmask == 0x00FF0000) {
if (fmt->Amask) {

View file

@ -235,13 +235,11 @@ SDL_BlendPoint(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode, Uint8 r
switch (dst->format->Rmask) {
case 0x00FF0000:
if (!dst->format->Amask) {
return SDL_BlendPoint_RGB888(dst, x, y, blendMode, r, g, b,
a);
return SDL_BlendPoint_RGB888(dst, x, y, blendMode, r, g, b, a);
} else {
return SDL_BlendPoint_ARGB8888(dst, x, y, blendMode, r, g, b,
a);
return SDL_BlendPoint_ARGB8888(dst, x, y, blendMode, r, g, b, a);
}
break;
/* break; -Wunreachable-code-break */
}
break;
default:

View file

@ -79,7 +79,7 @@ to a situation where the program can segfault.
/* !
\brief Lower limit of absolute zoom factor or rotation degrees.
*/
#define VALUE_LIMIT 0.001
/* #define VALUE_LIMIT 0.001 */
/* !
\brief Returns colorkey info for a surface