Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Update VS2012 solution - add missing files; fix some static analysis …

…warnings
  • Loading branch information
ferzkopp committed Dec 2, 2012
1 parent 21528b5 commit 6533cd79d18336ce599a6f51b00342a49f3fb4ee
@@ -255,6 +255,7 @@
<ClInclude Include="..\..\include\SDL_types.h" />
<ClInclude Include="..\..\include\SDL_version.h" />
<ClInclude Include="..\..\include\SDL_video.h" />
<ClInclude Include="..\..\include\SDL_gamecontroller.h" />
<ClInclude Include="..\..\src\core\windows\SDL_windows.h" />
<ClInclude Include="..\..\src\events\blank_cursor.h" />
<ClInclude Include="..\..\src\events\default_cursor.h" />
@@ -445,6 +446,7 @@
<ClCompile Include="..\..\src\video\windows\SDL_windowsvideo.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowswindow.c" />
<ClCompile Include="..\..\src\events\SDL_windowevents.c" />
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\src\main\windows\version.rc" />
@@ -27,7 +27,7 @@ UnEscapeQuotes(char *arg)
char *last = NULL;

while (*arg) {
if (*arg == '"' && *last == '\\') {
if (*arg == '"' && (last != NULL && *last == '\\')) {
char *c_curr = arg;
char *c_last = last;

@@ -263,7 +263,7 @@ SDLTest_RandomUint8BoundaryValue(Uint8 boundary1, Uint8 boundary2, SDL_bool vali
size = SDLTest_GenerateUnsignedBoundaryValues(maxValue,
(Uint64) boundary1, (Uint64) boundary2,
validDomain, buffer);
if (size == 0) {
if (buffer == NULL || size == 0) {
return 0;
}

@@ -291,7 +291,7 @@ SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool v
size = SDLTest_GenerateUnsignedBoundaryValues(maxValue,
(Uint64) boundary1, (Uint64) boundary2,
validDomain, buffer);
if(size == 0) {
if (buffer == NULL || size == 0) {
return 0;
}

@@ -319,7 +319,7 @@ SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool v
size = SDLTest_GenerateUnsignedBoundaryValues(maxValue,
(Uint64) boundary1, (Uint64) boundary2,
validDomain, buffer);
if(size == 0) {
if (buffer == NULL || size == 0) {
return 0;
}

@@ -347,7 +347,7 @@ SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool v
size = SDLTest_GenerateUnsignedBoundaryValues(maxValue,
(Uint64) boundary1, (Uint64) boundary2,
validDomain, buffer);
if(size == 0) {
if (buffer == NULL || size == 0) {
return 0;
}

@@ -467,7 +467,7 @@ SDLTest_RandomSint8BoundaryValue(Sint8 boundary1, Sint8 boundary2, SDL_bool vali
size = SDLTest_GenerateSignedBoundaryValues(minValue, maxValue,
(Sint64) boundary1, (Sint64) boundary2,
validDomain, buffer);
if(size == 0) {
if (buffer == NULL || size == 0) {
return CHAR_MIN;
}

@@ -495,7 +495,7 @@ SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool v
size = SDLTest_GenerateSignedBoundaryValues(minValue, maxValue,
(Sint64) boundary1, (Sint64) boundary2,
validDomain, buffer);
if(size == 0) {
if (buffer == NULL || size == 0) {
return SHRT_MIN;
}

@@ -524,7 +524,7 @@ SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool v
size = SDLTest_GenerateSignedBoundaryValues(minValue, maxValue,
(Sint64) boundary1, (Sint64) boundary2,
validDomain, buffer);
if(size == 0) {
if (buffer == NULL || size == 0) {
return INT_MIN;
}

@@ -553,7 +553,7 @@ SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL_bool v
size = SDLTest_GenerateSignedBoundaryValues(minValue, maxValue,
(Sint64) boundary1, (Sint64) boundary2,
validDomain, buffer);
if(size == 0) {
if (buffer == NULL || size == 0) {
return LLONG_MIN;
}

@@ -31,6 +31,8 @@
#include "SDL_config.h"

#include <stdarg.h> /* va_list */
#include <stdio.h>
#include <string.h>
#include <time.h>

#include "SDL_test.h"
@@ -212,7 +212,7 @@ static void surface_testBlit( SDL_Surface *testsur )
/**
* @brief Tests a blend mode.
*/
static int surface_testBlitBlendMode( SDL_Surface *testsur, SDL_Surface *face, int mode )
static int surface_testBlitBlendMode( SDL_Surface *testsur, SDL_Surface *face, SDL_BlendMode bMode )
{
int ret;
int i, j, ni, nj;
@@ -236,7 +236,7 @@ static int surface_testBlitBlendMode( SDL_Surface *testsur, SDL_Surface *face, i
for (j=0; j <= nj; j+=4) {
for (i=0; i <= ni; i+=4) {
/* Set blend mode. */
ret = SDL_SetSurfaceBlendMode( face, mode );
ret = SDL_SetSurfaceBlendMode( face, bMode );
if (SDL_ATassert( "SDL_SetSurfaceBlendMode", ret == 0))
return 1;

@@ -263,6 +263,7 @@ static void surface_testBlitBlend( SDL_Surface *testsur )
SDL_Surface *face;
int i, j, ni, nj;
int mode;
SDL_BlendMode bMode;

SDL_ATbegin( "Blit Blending Tests" );

@@ -353,11 +354,11 @@ static void surface_testBlitBlend( SDL_Surface *testsur )

/* Crazy blending mode magic. */
mode = (i/4*j/4) % 4;
if (mode==0) mode = SDL_BLENDMODE_NONE;
else if (mode==1) mode = SDL_BLENDMODE_BLEND;
else if (mode==2) mode = SDL_BLENDMODE_ADD;
else if (mode==3) mode = SDL_BLENDMODE_MOD;
ret = SDL_SetSurfaceBlendMode( face, mode );
if (mode==0) bMode = SDL_BLENDMODE_NONE;
else if (mode==1) bMode = SDL_BLENDMODE_BLEND;
else if (mode==2) bMode = SDL_BLENDMODE_ADD;
else if (mode==3) bMode = SDL_BLENDMODE_MOD;
ret = SDL_SetSurfaceBlendMode( face, bMode );
if (SDL_ATassert( "SDL_SetSurfaceBlendMode", ret == 0))
return;

0 comments on commit 6533cd7

Please sign in to comment.