Skip to content

Commit

Permalink
Fixed warnings in -pedantic mode
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Feb 26, 2006
1 parent 53cc50e commit 21a6019
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 29 deletions.
1 change: 1 addition & 0 deletions test/testdyngl.c
Expand Up @@ -42,6 +42,7 @@ void* get_funcaddr(const char* p)
printf("Unable to get function pointer for %s\n",p);
quit(1);
}
return NULL;
}

typedef struct
Expand Down
8 changes: 2 additions & 6 deletions test/testgl.c
Expand Up @@ -245,8 +245,6 @@ void DrawLogoCursor(void)
static int w, h;
int x, y;

SDL_Surface *screen = SDL_GetVideoSurface();

if ( ! cursor_texture ) {
SDL_Surface *image;
GLfloat texcoord[4];
Expand Down Expand Up @@ -303,7 +301,6 @@ void DrawLogoTexture(void)
static int w, h;
static int delta_x = 1;
static int delta_y = 1;
static Uint32 last_moved = 0;

SDL_Surface *screen = SDL_GetVideoSurface();

Expand Down Expand Up @@ -377,7 +374,6 @@ void DrawLogoBlit(void)
static int w, h;
static int delta_x = 1;
static int delta_y = 1;
static Uint32 last_moved = 0;

SDL_Rect dst;
SDL_Surface *screen = SDL_GetVideoSurface();
Expand Down Expand Up @@ -657,7 +653,7 @@ int RunGLTest( int argc, char* argv[],
glVertex3fv(cube[2]);
glColor3fv(color[7]);
glVertex3fv(cube[7]);
#else // flat cube
#else /* flat cube */
glColor3f(1.0, 0.0, 0.0);
glVertex3fv(cube[0]);
glVertex3fv(cube[1]);
Expand Down Expand Up @@ -767,7 +763,7 @@ int RunGLTest( int argc, char* argv[],

int main(int argc, char *argv[])
{
int i, logo, logocursor;
int i, logo, logocursor = 0;
int numtests;
int bpp = 0;
int slowly;
Expand Down
12 changes: 5 additions & 7 deletions test/testoverlay.c
Expand Up @@ -34,8 +34,6 @@ static void quit(int rc)

void RGBtoYUV(Uint8 *rgb, int *yuv, int monochrome, int luminance)
{
int i;

if (monochrome)
{
#if 1 /* these are the two formulas that I found on the FourCC site... */
Expand Down Expand Up @@ -80,7 +78,7 @@ void RGBtoYUV(Uint8 *rgb, int *yuv, int monochrome, int luminance)
*/
}

ConvertRGBtoYV12(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
void ConvertRGBtoYV12(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
{
int x,y;
int yuv[3];
Expand Down Expand Up @@ -120,7 +118,7 @@ ConvertRGBtoYV12(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
SDL_UnlockSurface(s);
}

ConvertRGBtoIYUV(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
void ConvertRGBtoIYUV(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
{
int x,y;
int yuv[3];
Expand Down Expand Up @@ -160,7 +158,7 @@ ConvertRGBtoIYUV(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
SDL_UnlockSurface(s);
}

ConvertRGBtoUYVY(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
void ConvertRGBtoUYVY(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
{
int x,y;
int yuv[3];
Expand Down Expand Up @@ -193,7 +191,7 @@ ConvertRGBtoUYVY(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
SDL_UnlockSurface(s);
}

ConvertRGBtoYVYU(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
void ConvertRGBtoYVYU(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
{
int x,y;
int yuv[3];
Expand Down Expand Up @@ -229,7 +227,7 @@ ConvertRGBtoYVYU(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
SDL_UnlockSurface(s);
}

ConvertRGBtoYUY2(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
void ConvertRGBtoYUY2(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
{
int x,y;
int yuv[3];
Expand Down
16 changes: 7 additions & 9 deletions test/testoverlay2.c
Expand Up @@ -57,8 +57,6 @@ static void quit(int rc)

void RGBtoYUV(Uint8 *rgb, int *yuv, int monochrome, int luminance)
{
int i;

if (monochrome)
{
#if 1 /* these are the two formulas that I found on the FourCC site... */
Expand Down Expand Up @@ -92,7 +90,7 @@ void RGBtoYUV(Uint8 *rgb, int *yuv, int monochrome, int luminance)
}
}

ConvertRGBtoYV12(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
void ConvertRGBtoYV12(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
{
int x,y;
int yuv[3];
Expand Down Expand Up @@ -125,7 +123,7 @@ ConvertRGBtoYV12(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
SDL_UnlockSurface(s);
}

ConvertRGBtoIYUV(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
void ConvertRGBtoIYUV(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
{
int x,y;
int yuv[3];
Expand Down Expand Up @@ -158,7 +156,7 @@ ConvertRGBtoIYUV(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
SDL_UnlockSurface(s);
}

ConvertRGBtoUYVY(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
void ConvertRGBtoUYVY(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
{
int x,y;
int yuv[3];
Expand Down Expand Up @@ -191,7 +189,7 @@ ConvertRGBtoUYVY(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
SDL_UnlockSurface(s);
}

ConvertRGBtoYVYU(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
void ConvertRGBtoYVYU(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
{
int x,y;
int yuv[3];
Expand Down Expand Up @@ -227,7 +225,7 @@ ConvertRGBtoYVYU(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
SDL_UnlockSurface(s);
}

ConvertRGBtoYUY2(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
void ConvertRGBtoYUY2(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
{
int x,y;
int yuv[3];
Expand Down Expand Up @@ -416,7 +414,7 @@ int main(int argc, char **argv)
/* Set video mode */
if ( (screen=SDL_SetVideoMode(MOOSEPIC_W*scale, MOOSEPIC_H*scale, 0, SDL_RESIZABLE | SDL_SWSURFACE)) == NULL )
{
fprintf(stderr, "Couldn't set video mode: %s\n", 0, SDL_GetError());
fprintf(stderr, "Couldn't set video mode: %s\n", SDL_GetError());
free(RawMooseData);
quit(4);
}
Expand All @@ -430,7 +428,7 @@ int main(int argc, char **argv)
MOOSEPIC_H, 8, MOOSEPIC_W, 0, 0, 0, 0);
if (MooseFrame[i]==NULL)
{
fprintf(stderr, "Couldn't create SDL_Surfaces:%s\n", 0, SDL_GetError());
fprintf(stderr, "Couldn't create SDL_Surfaces:%s\n", SDL_GetError());
free(RawMooseData);
quit(5);
}
Expand Down
7 changes: 0 additions & 7 deletions test/testsem.c
Expand Up @@ -13,13 +13,6 @@
static SDL_sem *sem;
int alive = 1;

/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
static void quit(int rc)
{
SDL_Quit();
exit(rc);
}

int ThreadFunc(void *data)
{
while ( alive ) {
Expand Down

0 comments on commit 21a6019

Please sign in to comment.