changeset 1443:9ebbbb4ae53b

Fixed some OpenWatcom warnings
author Sam Lantinga <slouken@libsdl.org>
date Sun, 26 Feb 2006 19:37:40 +0000
parents e3242177fe4a
children 12113661052d
files src/thread/os2/SDL_systhread.c src/video/SDL_blit_A.c src/video/SDL_blit_N.c
diffstat 3 files changed, 13 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/thread/os2/SDL_systhread.c	Sun Feb 26 19:30:21 2006 +0000
+++ b/src/thread/os2/SDL_systhread.c	Sun Feb 26 19:37:40 2006 +0000
@@ -72,7 +72,7 @@
   pThreadParms->args = args;
   // Start the thread using the runtime library of calling app!
   thread->threadid = thread->handle = (*pfnBeginThread)(threadfunc, NULL, 512*1024, pThreadParms);
-  if (thread->threadid<=0)
+  if ((int)thread->threadid <= 0)
   {
     SDL_SetError("Not enough resources to create thread");
     return(-1);
--- a/src/video/SDL_blit_A.c	Sun Feb 26 19:30:21 2006 +0000
+++ b/src/video/SDL_blit_A.c	Sun Feb 26 19:37:40 2006 +0000
@@ -1468,10 +1468,11 @@
 				Uint32 sw, dw, s;
 				sw = *(Uint32 *)srcp;
 				dw = *(Uint32 *)dstp;
-				if(SDL_BYTEORDER == SDL_BIG_ENDIAN)
-					s = (prev_sw << 16) + (sw >> 16);
-				else
-					s = (prev_sw >> 16) + (sw << 16);
+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+				s = (prev_sw << 16) + (sw >> 16);
+#else
+				s = (prev_sw >> 16) + (sw << 16);
+#endif
 				prev_sw = sw;
 				*(Uint32 *)dstp = BLEND2x16_50(dw, s, mask);
 				dstp += 2;
@@ -1482,10 +1483,11 @@
 			/* final pixel if any */
 			if(w) {
 				Uint16 d = *dstp, s;
-				if(SDL_BYTEORDER == SDL_BIG_ENDIAN)
-					s = (Uint16)prev_sw;
-				else
-					s = (Uint16)(prev_sw >> 16);
+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+				s = (Uint16)prev_sw;
+#else
+				s = (Uint16)(prev_sw >> 16);
+#endif
 				*dstp = BLEND16_50(d, s, mask);
 				srcp++;
 				dstp++;
--- a/src/video/SDL_blit_N.c	Sun Feb 26 19:30:21 2006 +0000
+++ b/src/video/SDL_blit_N.c	Sun Feb 26 19:37:40 2006 +0000
@@ -835,10 +835,10 @@
 #endif
 
 /* This is now endian dependent */
-#if ( SDL_BYTEORDER == SDL_LIL_ENDIAN )
+#if SDL_BYTEORDER == SDL_LIL_ENDIAN
 #define HI	1
 #define LO	0
-#else /* ( SDL_BYTEORDER == SDL_BIG_ENDIAN ) */
+#else /* SDL_BYTEORDER == SDL_BIG_ENDIAN */
 #define HI	0
 #define LO	1
 #endif