From eec4710c533c31348a8dd685c96338481b5f81c9 Mon Sep 17 00:00:00 2001 From: Gabriel Jacobo Date: Thu, 29 Aug 2013 14:03:44 -0300 Subject: [PATCH] Fixes bug #2074 - Thanks Sylvain! 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 --- src/thread/pthread/SDL_syssem.c | 2 +- src/timer/unix/SDL_systimer.c | 6 +++--- src/video/android/SDL_androidgl.c | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/thread/pthread/SDL_syssem.c b/src/thread/pthread/SDL_syssem.c index 4acd6bfb5..91932f64c 100644 --- a/src/thread/pthread/SDL_syssem.c +++ b/src/thread/pthread/SDL_syssem.c @@ -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); diff --git a/src/timer/unix/SDL_systimer.c b/src/timer/unix/SDL_systimer.c index 134c12a91..88a40ba51 100644 --- a/src/timer/unix/SDL_systimer.c +++ b/src/timer/unix/SDL_systimer.c @@ -158,9 +158,9 @@ SDL_GetPerformanceFrequency(void) freq /= mach_base_info.numer; return freq; #endif - } else { - return 1000000; - } + } + + return 1000000; } void diff --git a/src/video/android/SDL_androidgl.c b/src/video/android/SDL_androidgl.c index 1a3eb4c5f..691fbf7fb 100644 --- a/src/video/android/SDL_androidgl.c +++ b/src/video/android/SDL_androidgl.c @@ -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? */