Fixes bug #2074 - Thanks Sylvain!
authorGabriel Jacobo <gabomdq@gmail.com>
Thu, 29 Aug 2013 14:03:44 -0300
changeset 7722 ea5565d856a8
parent 7721 bdf8c2c84e14
child 7723 aea98cc3e696
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
src/timer/unix/SDL_systimer.c
src/video/android/SDL_androidgl.c
--- a/src/thread/pthread/SDL_syssem.c	Thu Aug 29 08:30:21 2013 -0700
+++ b/src/thread/pthread/SDL_syssem.c	Thu Aug 29 14:03:44 2013 -0300
@@ -156,7 +156,7 @@
 #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);
--- a/src/timer/unix/SDL_systimer.c	Thu Aug 29 08:30:21 2013 -0700
+++ b/src/timer/unix/SDL_systimer.c	Thu Aug 29 14:03:44 2013 -0300
@@ -158,9 +158,9 @@
         freq /= mach_base_info.numer;
         return freq;
 #endif
-    } else {
-        return 1000000;
-    }
+    } 
+        
+    return 1000000;
 }
 
 void
--- a/src/video/android/SDL_androidgl.c	Thu Aug 29 08:30:21 2013 -0700
+++ b/src/video/android/SDL_androidgl.c	Thu Aug 29 14:03:44 2013 -0300
@@ -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? */