Fixed warnings in -pedantic mode
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401443
This commit is contained in:
parent
df36fe080a
commit
00cfc17565
5 changed files with 15 additions and 29 deletions
|
@ -42,6 +42,7 @@ void* get_funcaddr(const char* p)
|
||||||
printf("Unable to get function pointer for %s\n",p);
|
printf("Unable to get function pointer for %s\n",p);
|
||||||
quit(1);
|
quit(1);
|
||||||
}
|
}
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|
|
@ -245,8 +245,6 @@ void DrawLogoCursor(void)
|
||||||
static int w, h;
|
static int w, h;
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
SDL_Surface *screen = SDL_GetVideoSurface();
|
|
||||||
|
|
||||||
if ( ! cursor_texture ) {
|
if ( ! cursor_texture ) {
|
||||||
SDL_Surface *image;
|
SDL_Surface *image;
|
||||||
GLfloat texcoord[4];
|
GLfloat texcoord[4];
|
||||||
|
@ -303,7 +301,6 @@ void DrawLogoTexture(void)
|
||||||
static int w, h;
|
static int w, h;
|
||||||
static int delta_x = 1;
|
static int delta_x = 1;
|
||||||
static int delta_y = 1;
|
static int delta_y = 1;
|
||||||
static Uint32 last_moved = 0;
|
|
||||||
|
|
||||||
SDL_Surface *screen = SDL_GetVideoSurface();
|
SDL_Surface *screen = SDL_GetVideoSurface();
|
||||||
|
|
||||||
|
@ -377,7 +374,6 @@ void DrawLogoBlit(void)
|
||||||
static int w, h;
|
static int w, h;
|
||||||
static int delta_x = 1;
|
static int delta_x = 1;
|
||||||
static int delta_y = 1;
|
static int delta_y = 1;
|
||||||
static Uint32 last_moved = 0;
|
|
||||||
|
|
||||||
SDL_Rect dst;
|
SDL_Rect dst;
|
||||||
SDL_Surface *screen = SDL_GetVideoSurface();
|
SDL_Surface *screen = SDL_GetVideoSurface();
|
||||||
|
@ -657,7 +653,7 @@ int RunGLTest( int argc, char* argv[],
|
||||||
glVertex3fv(cube[2]);
|
glVertex3fv(cube[2]);
|
||||||
glColor3fv(color[7]);
|
glColor3fv(color[7]);
|
||||||
glVertex3fv(cube[7]);
|
glVertex3fv(cube[7]);
|
||||||
#else // flat cube
|
#else /* flat cube */
|
||||||
glColor3f(1.0, 0.0, 0.0);
|
glColor3f(1.0, 0.0, 0.0);
|
||||||
glVertex3fv(cube[0]);
|
glVertex3fv(cube[0]);
|
||||||
glVertex3fv(cube[1]);
|
glVertex3fv(cube[1]);
|
||||||
|
@ -767,7 +763,7 @@ int RunGLTest( int argc, char* argv[],
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int i, logo, logocursor;
|
int i, logo, logocursor = 0;
|
||||||
int numtests;
|
int numtests;
|
||||||
int bpp = 0;
|
int bpp = 0;
|
||||||
int slowly;
|
int slowly;
|
||||||
|
|
|
@ -34,8 +34,6 @@ static void quit(int rc)
|
||||||
|
|
||||||
void RGBtoYUV(Uint8 *rgb, int *yuv, int monochrome, int luminance)
|
void RGBtoYUV(Uint8 *rgb, int *yuv, int monochrome, int luminance)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
|
|
||||||
if (monochrome)
|
if (monochrome)
|
||||||
{
|
{
|
||||||
#if 1 /* these are the two formulas that I found on the FourCC site... */
|
#if 1 /* these are the two formulas that I found on the FourCC site... */
|
||||||
|
@ -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 x,y;
|
||||||
int yuv[3];
|
int yuv[3];
|
||||||
|
@ -120,7 +118,7 @@ ConvertRGBtoYV12(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
|
||||||
SDL_UnlockSurface(s);
|
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 x,y;
|
||||||
int yuv[3];
|
int yuv[3];
|
||||||
|
@ -160,7 +158,7 @@ ConvertRGBtoIYUV(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
|
||||||
SDL_UnlockSurface(s);
|
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 x,y;
|
||||||
int yuv[3];
|
int yuv[3];
|
||||||
|
@ -193,7 +191,7 @@ ConvertRGBtoUYVY(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
|
||||||
SDL_UnlockSurface(s);
|
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 x,y;
|
||||||
int yuv[3];
|
int yuv[3];
|
||||||
|
@ -229,7 +227,7 @@ ConvertRGBtoYVYU(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
|
||||||
SDL_UnlockSurface(s);
|
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 x,y;
|
||||||
int yuv[3];
|
int yuv[3];
|
||||||
|
|
|
@ -57,8 +57,6 @@ static void quit(int rc)
|
||||||
|
|
||||||
void RGBtoYUV(Uint8 *rgb, int *yuv, int monochrome, int luminance)
|
void RGBtoYUV(Uint8 *rgb, int *yuv, int monochrome, int luminance)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
|
|
||||||
if (monochrome)
|
if (monochrome)
|
||||||
{
|
{
|
||||||
#if 1 /* these are the two formulas that I found on the FourCC site... */
|
#if 1 /* these are the two formulas that I found on the FourCC site... */
|
||||||
|
@ -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 x,y;
|
||||||
int yuv[3];
|
int yuv[3];
|
||||||
|
@ -125,7 +123,7 @@ ConvertRGBtoYV12(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
|
||||||
SDL_UnlockSurface(s);
|
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 x,y;
|
||||||
int yuv[3];
|
int yuv[3];
|
||||||
|
@ -158,7 +156,7 @@ ConvertRGBtoIYUV(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
|
||||||
SDL_UnlockSurface(s);
|
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 x,y;
|
||||||
int yuv[3];
|
int yuv[3];
|
||||||
|
@ -191,7 +189,7 @@ ConvertRGBtoUYVY(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
|
||||||
SDL_UnlockSurface(s);
|
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 x,y;
|
||||||
int yuv[3];
|
int yuv[3];
|
||||||
|
@ -227,7 +225,7 @@ ConvertRGBtoYVYU(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
|
||||||
SDL_UnlockSurface(s);
|
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 x,y;
|
||||||
int yuv[3];
|
int yuv[3];
|
||||||
|
@ -416,7 +414,7 @@ int main(int argc, char **argv)
|
||||||
/* Set video mode */
|
/* Set video mode */
|
||||||
if ( (screen=SDL_SetVideoMode(MOOSEPIC_W*scale, MOOSEPIC_H*scale, 0, SDL_RESIZABLE | SDL_SWSURFACE)) == NULL )
|
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);
|
free(RawMooseData);
|
||||||
quit(4);
|
quit(4);
|
||||||
}
|
}
|
||||||
|
@ -430,7 +428,7 @@ int main(int argc, char **argv)
|
||||||
MOOSEPIC_H, 8, MOOSEPIC_W, 0, 0, 0, 0);
|
MOOSEPIC_H, 8, MOOSEPIC_W, 0, 0, 0, 0);
|
||||||
if (MooseFrame[i]==NULL)
|
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);
|
free(RawMooseData);
|
||||||
quit(5);
|
quit(5);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,13 +13,6 @@
|
||||||
static SDL_sem *sem;
|
static SDL_sem *sem;
|
||||||
int alive = 1;
|
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)
|
int ThreadFunc(void *data)
|
||||||
{
|
{
|
||||||
while ( alive ) {
|
while ( alive ) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue