diff --git a/test/graywin.c b/test/graywin.c index 45631149..c1f8a5dd 100644 --- a/test/graywin.c +++ b/test/graywin.c @@ -24,7 +24,7 @@ void DrawBox(SDL_Surface *screen, int X, int Y, int width, int height) /* Seed the random number generator */ if ( seeded == 0 ) { - srand(time(NULL)); + srand((unsigned int) time(NULL)); seeded = 1; } diff --git a/test/testdyngl.c b/test/testdyngl.c index a20bd1a4..538b47fc 100644 --- a/test/testdyngl.c +++ b/test/testdyngl.c @@ -138,9 +138,9 @@ int main(int argc,char *argv[]) for(i=0;iformat, 255, 0, 0); SDL_Rect r; - r.x = (sin((float)t * 2 * 3.1459) + 1.0) / 2.0 * (screen->w-20); + r.x = (Sint16) ((sin((float)t * 2 * 3.1459) + 1.0) / 2.0 * (screen->w-20)); r.y = 0; r.w = 20; r.h = screen->h; @@ -137,7 +137,7 @@ Uint32 FastestFlags(Uint32 flags, int width, int height, int bpp) /* Direct hardware blitting without double-buffering causes really bad flickering. */ - if ( info->video_mem*1024 > (height*width*bpp/8) ) { + if ( info->video_mem*1024 > ((Uint32)(height*width*bpp/8)) ) { flags |= SDL_DOUBLEBUF; } else { flags &= ~SDL_HWSURFACE; @@ -239,7 +239,7 @@ int main(int argc, char *argv[]) sprite_rects += numsprites; sprite_w = sprite->w; sprite_h = sprite->h; - srand(time(NULL)); + srand((unsigned int) time(NULL)); for ( i=0; iw - sprite_w); positions[i].y = rand()%(screen->h - sprite_h);