Patch from Sylvain to fix clang warnings

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

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