Skip to content

Commit

Permalink
Fixes bug #2074 - Thanks Sylvain!
Browse files Browse the repository at this point in the history
SDL_syssem.c:159 comparison of unsigned expression >= 0 is always true
Solved by comparing unsigneds directly

SDL_systimer.c:164: warning: control may reach end of Compile
Solved by returning the default value if all else fails.

SDL_androidgl.c:41:1: warning: type specifier missing, defaults to 'int'
SDL_androidgl.c:47:1: warning: control reaches end of non-void function
Solved by adding void return type to the function implementation
  • Loading branch information
gabomdq committed Aug 29, 2013
1 parent e07d7e6 commit eec4710
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/thread/pthread/SDL_syssem.c
Expand Up @@ -156,7 +156,7 @@ SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout)
#else
end = SDL_GetTicks() + timeout;
while ((retval = SDL_SemTryWait(sem)) == SDL_MUTEX_TIMEDOUT) {
if ((SDL_GetTicks() - end) >= 0) {
if (SDL_GetTicks() >= end) {
break;
}
SDL_Delay(0);
Expand Down
6 changes: 3 additions & 3 deletions src/timer/unix/SDL_systimer.c
Expand Up @@ -158,9 +158,9 @@ SDL_GetPerformanceFrequency(void)
freq /= mach_base_info.numer;
return freq;
#endif
} else {
return 1000000;
}
}

return 1000000;
}

void
Expand Down
1 change: 1 addition & 0 deletions src/video/android/SDL_androidgl.c
Expand Up @@ -38,6 +38,7 @@
SDL_EGL_CreateContext_impl(Android)
SDL_EGL_MakeCurrent_impl(Android)

void
Android_GLES_SwapWindow(_THIS, SDL_Window * window)
{
/* FIXME: These two functions were in the Java code, do we really need them? */
Expand Down

0 comments on commit eec4710

Please sign in to comment.