Skip to content

Commit

Permalink
Static analysis fix: uninitialized variables.
Browse files Browse the repository at this point in the history
This is actually a false-positive, in this case, since Clang doesn't know
 that SDL_SetError() only ever returns -1. Feature request to improve that,
 with explanation about these specific SDL patches, is here:

   http://llvm.org/bugs/show_bug.cgi?id=19208
  • Loading branch information
icculus committed Mar 20, 2014
1 parent 1a2a3e9 commit b659c70
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/render/SDL_render.c
Expand Up @@ -970,8 +970,8 @@ static void
SDL_UnlockTextureYUV(SDL_Texture * texture)
{
SDL_Texture *native = texture->native;
void *native_pixels;
int native_pitch;
void *native_pixels = NULL;
int native_pitch = 0;
SDL_Rect rect;

rect.x = 0;
Expand All @@ -991,8 +991,8 @@ static void
SDL_UnlockTextureNative(SDL_Texture * texture)
{
SDL_Texture *native = texture->native;
void *native_pixels;
int native_pitch;
void *native_pixels = NULL;
int native_pitch = 0;
const SDL_Rect *rect = &texture->locked_rect;
const void* pixels = (void *) ((Uint8 *) texture->pixels +
rect->y * texture->pitch +
Expand Down

0 comments on commit b659c70

Please sign in to comment.