fix somew llvm/webgl warnings.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4757 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2014-09-22 17:49:45 +00:00
parent 25d470bffb
commit 8d72e19726
8 changed files with 13 additions and 20 deletions

View file

@ -249,7 +249,7 @@ qbyte *ReadTargaFile(qbyte *buf, int length, int *width, int *height, qboolean *
//11:greyscale
#undef getc
#define getc(x) *data++
unsigned row, rows=tgaheader.height, column, columns=tgaheader.width, packetHeader, packetSize, j;
unsigned int row, rows=tgaheader.height, column, columns=tgaheader.width, packetHeader, packetSize, j;
qbyte *pixbuf, *targa_rgba=BZ_Malloc(rows*columns*(asgrey?1:4)), *inrow;
qbyte blue, red, green, alphabyte;

View file

@ -855,7 +855,7 @@ static void QCBUILTIN PF_R_DynamicLight_Get(pubprogfuncs_t *prinst, struct globa
enum lightfield_e field = G_FLOAT(OFS_PARM1);
if (lno >= rtlights_max)
{
if (field == -1)
if ((int)field == -1)
G_FLOAT(OFS_RETURN) = rtlights_max;
else
G_INT(OFS_RETURN) = 0;

View file

@ -4381,7 +4381,7 @@ static qboolean FTENET_WebSocket_GetPacket(ftenet_generic_connection_t *gcon)
net_message.cursize = 0;//just incase
return false;
}
static qboolean FTENET_WebSocket_SendPacket(ftenet_generic_connection_t *gcon, int length, void *data, netadr_t *to)
static qboolean FTENET_WebSocket_SendPacket(ftenet_generic_connection_t *gcon, int length, const void *data, netadr_t *to)
{
ftenet_websocket_connection_t *wsc = (void*)gcon;
if (NET_CompareAdr(to, &wsc->remoteadr))

View file

@ -940,10 +940,10 @@ qintptr_t VARGS Plug_FS_Open(void *offset, quintptr_t mask, const qintptr_t *arg
if (VM_OOB(arg[1], sizeof(int)))
return -2;
if (!currentplug)
return -3; //streams depend upon current plugin context. which isn't valid in a thread.
ret = VM_POINTER(arg[1]);
*ret = -1;
if (!currentplug)
return -3; //streams depend upon current plugin context. which isn't valid in a thread.
switch(arg[2])
{

View file

@ -644,7 +644,6 @@ Global
{75D91BDE-CC30-4C53-BF33-5F69EF13A61B}.Debug|Win32.Build.0 = Debug|Win32
{75D91BDE-CC30-4C53-BF33-5F69EF13A61B}.Debug|x64.ActiveCfg = Debug|Win32
{75D91BDE-CC30-4C53-BF33-5F69EF13A61B}.GLDebug|Win32.ActiveCfg = Debug|Win32
{75D91BDE-CC30-4C53-BF33-5F69EF13A61B}.GLDebug|Win32.Build.0 = Debug|Win32
{75D91BDE-CC30-4C53-BF33-5F69EF13A61B}.GLDebug|x64.ActiveCfg = Debug|Win32
{75D91BDE-CC30-4C53-BF33-5F69EF13A61B}.GLRelease|Win32.ActiveCfg = Release|Win32
{75D91BDE-CC30-4C53-BF33-5F69EF13A61B}.GLRelease|Win32.Build.0 = Release|Win32

View file

@ -392,7 +392,7 @@ void R_GenDlightMesh(struct batch_s *batch)
}
void R_GenDlightBatches(batch_t *batches[])
{
int i, sort;
int i, j, sort;
dlight_t *l;
batch_t *b;
if (!lpplight_shader)
@ -431,10 +431,8 @@ void R_GenDlightBatches(batch_t *batches[])
b->skin = &lpplight_shader->defaulttextures;
b->texture = NULL;
b->shader = lpplight_shader;
b->lightmap[0] = -1;
b->lightmap[1] = -1;
b->lightmap[2] = -1;
b->lightmap[3] = -1;
for (j = 0; j < MAXRLIGHTMAPS; j++)
b->lightmap[j] = -1;
b->surf_first = i;
b->flags |= BEF_NOSHADOWS;
b->vbo = NULL;

View file

@ -36,8 +36,8 @@ static int QDECL VFSWEB_WriteBytes (struct vfsfile_s *file, const void *buffer,
static qboolean QDECL VFSWEB_Seek (struct vfsfile_s *file, qofs_t pos)
{
vfswebfile_t *intfile = (vfswebfile_t*)file;
if (pos < 0)
return 0;
// if (pos < 0)
// return 0;
intfile->offset = pos;
return true;
}

View file

@ -145,6 +145,7 @@ void Sys_Shutdown(void)
int VARGS Sys_DebugLog(char *file, char *fmt, ...)
{
return 0;
};
@ -175,10 +176,7 @@ void Sys_MainLoop(void)
int QDECL main(int argc, char **argv)
{
float time, newtime, oldtime;
quakeparms_t parms;
int t;
int delay = 1;
memset(&parms, 0, sizeof(parms));
@ -195,9 +193,6 @@ int QDECL main(int argc, char **argv)
Sys_Printf ("Host_Init\n");
Host_Init (&parms);
oldtime = Sys_DoubleTime ();
//-1 fps should give vsync
emscripten_set_main_loop(Sys_MainLoop, -1, false);
return 0;
@ -370,6 +365,7 @@ Uint8 SDL_GetAppState(void)
return SDL_APPACTIVE;
}
#define socklen_t int
/*
int getsockname(int socket, struct sockaddr *address, socklen_t *address_len)
{
return -1;
@ -382,4 +378,4 @@ ssize_t sendto(int socket, const void *message, size_t length, int flags, const
{
return -1;
}
*/