More warning fixes

git-svn-id: https://svn.eduke32.com/eduke32@347 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-11-19 01:28:51 +00:00
parent 1b91c1bae3
commit 730129aee6
5 changed files with 21 additions and 18 deletions

View file

@ -5542,7 +5542,7 @@ int initengine(void)
#if !defined _WIN32 && defined DEBUGGINGAIDS
struct sigaction sigact, oldact;
memset(&sigact, 0, sizeof(sigact));
sigact.sa_sigaction = sighandler;
sigact.sa_sigaction = (void *)sighandler;
sigact.sa_flags = SA_SIGINFO;
sigaction(SIGFPE, &sigact, &oldact);
#endif

View file

@ -663,7 +663,7 @@ failure:
//Note: even though it says md2model, it works for both md2model&md3model
static long mdloadskin (md2model *m, int number, int pal, int surf)
{
long i,j, fptr=0, bpl, xsiz, ysiz, osizx, osizy, texfmt = GL_RGBA, intexfmt = GL_RGBA;
long i,j, fptr=0, bpl, xsiz=0, ysiz=0, osizx, osizy, texfmt = GL_RGBA, intexfmt = GL_RGBA;
char *skinfile, hasalpha, fn[BMAX_PATH+65];
GLuint *texidx = NULL;
mdskinmap_t *sk, *skzero = NULL;

View file

@ -198,7 +198,7 @@ long netread (long *other, char *dabuf, long bufsiz) //0:no packets in buffer
long i;
i = sizeof(ip);
if (recvfrom(mysock,dabuf,bufsiz,0,(struct sockaddr *)&ip,(int *)&i) == -1) return(0);
if (recvfrom(mysock,dabuf,bufsiz,0,(struct sockaddr *)&ip,(unsigned int *)&i) == -1) return(0);
#if (SIMMIS > 0)
if ((rand()&255) < SIMMIS) return(0);
#endif

View file

@ -971,7 +971,7 @@ void writexcache(char *fn, long len, long dameth, char effect, texcacheheader *h
char *pic = NULL, *packbuf = NULL;
void *midbuf = NULL;
unsigned long alloclen=0, level, miplen;
unsigned long padx, pady;
unsigned long padx=0, pady=0;
GLuint gi;
long j, k;
@ -1006,7 +1006,7 @@ void writexcache(char *fn, long len, long dameth, char effect, texcacheheader *h
}
gi = GL_FALSE;
bglGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_COMPRESSED_ARB, &gi);
bglGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_COMPRESSED_ARB, (GLint *)&gi);
if (gi != GL_TRUE) return;
md4once((unsigned char *)fn, strlen(fn), mdsum);
@ -1032,25 +1032,25 @@ void writexcache(char *fn, long len, long dameth, char effect, texcacheheader *h
bglGetError();
for (level = 0; level==0 || (padx > 1 || pady > 1); level++) {
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_COMPRESSED_ARB, &gi);
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_COMPRESSED_ARB, (GLint *)&gi);
if (bglGetError() != GL_NO_ERROR) goto failure;
if (gi != GL_TRUE) goto failure; // an uncompressed mipmap
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_INTERNAL_FORMAT, &gi);
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_INTERNAL_FORMAT, (GLint *)&gi);
if (bglGetError() != GL_NO_ERROR) goto failure;
pict.format = B_LITTLE32(gi);
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_WIDTH, &gi);
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_WIDTH, (GLint *)&gi);
if (bglGetError() != GL_NO_ERROR) goto failure;
padx = gi; pict.xdim = B_LITTLE32(gi);
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_HEIGHT, &gi);
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_HEIGHT, (GLint *)&gi);
if (bglGetError() != GL_NO_ERROR) goto failure;
pady = gi; pict.ydim = B_LITTLE32(gi);
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_BORDER, &gi);
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_BORDER, (GLint *)&gi);
if (bglGetError() != GL_NO_ERROR) goto failure;
pict.border = B_LITTLE32(gi);
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_DEPTH, &gi);
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_DEPTH, (GLint *)&gi);
if (bglGetError() != GL_NO_ERROR) goto failure;
pict.depth = B_LITTLE32(gi);
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB, &gi);
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB, (GLint *)&gi);
if (bglGetError() != GL_NO_ERROR) goto failure;
miplen = (long)gi; pict.size = B_LITTLE32(gi);
@ -1492,6 +1492,7 @@ void drawpoly (double *dpx, double *dpy, long n, long method)
pc[0] = pc[1] = pc[2] = f;
switch (method&3)
{
default:
case 0:
pc[3] = 1.0; break;
case 1:

View file

@ -481,16 +481,16 @@ void grabmouse(char a)
{
if (a != mouseacquired)
{
// #ifndef DEBUGGINGAIDS
#ifndef DEBUGGINGAIDS
SDL_GrabMode g;
g = SDL_WM_GrabInput(a ? SDL_GRAB_ON : SDL_GRAB_OFF);
mouseacquired = (g == SDL_GRAB_ON);
SDL_ShowCursor(mouseacquired ? SDL_DISABLE : SDL_ENABLE);
// #else
// mouseacquired = a;
// #endif
#else
mouseacquired = a;
#endif
}
}
else
@ -1361,6 +1361,7 @@ int handleevents(void)
if (ev.active.state & SDL_APPINPUTFOCUS)
{
appactive = ev.active.gain;
#ifndef DEBUGGINGAIDS
if (mouseacquired && moustat)
{
if (appactive)
@ -1374,6 +1375,7 @@ int handleevents(void)
SDL_ShowCursor(SDL_ENABLE);
}
}
#endif
rv=-1;
}
break;
@ -1478,12 +1480,12 @@ int handleevents(void)
if (moustat)
{
if ((mwheelup) && (mwheelup <= (totalclock - MWHEELTICKS)))
if ((mwheelup) && (mwheelup <= (unsigned)(totalclock - MWHEELTICKS)))
{
mouseb &= ~16;
mwheelup = 0;
}
if ((mwheeldown) && (mwheeldown <= (totalclock - MWHEELTICKS)))
if ((mwheeldown) && (mwheeldown <= (unsigned)(totalclock - MWHEELTICKS)))
{
mouseb &= ~32;
mwheeldown = 0;