[quake3-commits] r2187 - in trunk: . code/asm code/botlib code/game code/qcommon code/renderer
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Oct 21 18:48:54 EDT 2011
Author: tma
Date: 2011-10-21 18:48:53 -0400 (Fri, 21 Oct 2011)
New Revision: 2187
Modified:
trunk/Makefile
trunk/code/asm/snapvector.c
trunk/code/botlib/be_ai_chat.c
trunk/code/game/g_cmds.c
trunk/code/qcommon/common.c
trunk/code/qcommon/q_platform.h
trunk/code/qcommon/unzip.c
trunk/code/renderer/tr_model_iqm.c
trunk/code/renderer/tr_scene.c
Log:
* clang support
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2011-10-14 17:03:59 UTC (rev 2186)
+++ trunk/Makefile 2011-10-21 22:48:53 UTC (rev 2187)
@@ -276,7 +276,7 @@
endif
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
- -pipe -DUSE_ICON
+ -Wno-self-assign -pipe -DUSE_ICON
CLIENT_CFLAGS += $(SDL_CFLAGS)
OPTIMIZEVM = -O3 -funroll-loops -fomit-frame-pointer
Modified: trunk/code/asm/snapvector.c
===================================================================
--- trunk/code/asm/snapvector.c 2011-10-14 17:03:59 UTC (rev 2186)
+++ trunk/code/asm/snapvector.c 2011-10-21 22:48:53 UTC (rev 2187)
@@ -55,9 +55,9 @@
#define QROUNDX87(src) \
"flds " src "\n" \
- "fistp " src "\n" \
- "fild " src "\n" \
- "fstp " src "\n"
+ "fistpl " src "\n" \
+ "fildl " src "\n" \
+ "fstpl " src "\n"
void qsnapvectorx87(vec3_t vec)
{
Modified: trunk/code/botlib/be_ai_chat.c
===================================================================
--- trunk/code/botlib/be_ai_chat.c 2011-10-14 17:03:59 UTC (rev 2186)
+++ trunk/code/botlib/be_ai_chat.c 2011-10-21 22:48:53 UTC (rev 2187)
@@ -1173,7 +1173,7 @@
{
if (token.type == TT_NUMBER && (token.subtype & TT_INTEGER))
{
- if (token.intvalue < 0 || token.intvalue >= MAX_MATCHVARIABLES)
+ if (token.intvalue >= MAX_MATCHVARIABLES)
{
SourceError(source, "can't have more than %d match variables\n", MAX_MATCHVARIABLES);
FreeSource(source);
Modified: trunk/code/game/g_cmds.c
===================================================================
--- trunk/code/game/g_cmds.c 2011-10-14 17:03:59 UTC (rev 2186)
+++ trunk/code/game/g_cmds.c 2011-10-21 22:48:53 UTC (rev 2187)
@@ -954,7 +954,7 @@
return;
}
// no chatting to players in tournements
- if ( (g_gametype.integer == GT_TOURNAMENT )) {
+ if ( g_gametype.integer == GT_TOURNAMENT ) {
return;
}
Modified: trunk/code/qcommon/common.c
===================================================================
--- trunk/code/qcommon/common.c 2011-10-14 17:03:59 UTC (rev 2186)
+++ trunk/code/qcommon/common.c 2011-10-21 22:48:53 UTC (rev 2187)
@@ -2329,7 +2329,10 @@
=================
*/
static void Com_Crash_f( void ) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnull-dereference"
* ( int * ) 0 = 0x12345678;
+#pragma clang diagnostic pop
}
/*
Modified: trunk/code/qcommon/q_platform.h
===================================================================
--- trunk/code/qcommon/q_platform.h 2011-10-14 17:03:59 UTC (rev 2186)
+++ trunk/code/qcommon/q_platform.h 2011-10-21 22:48:53 UTC (rev 2187)
@@ -179,7 +179,12 @@
#define OS_STRING "kFreeBSD"
#endif
+#ifdef __clang__
+#define ID_INLINE static inline
+#else
#define ID_INLINE inline
+#endif
+
#define PATH_SEP '/'
#if defined __i386__
Modified: trunk/code/qcommon/unzip.c
===================================================================
--- trunk/code/qcommon/unzip.c 2011-10-14 17:03:59 UTC (rev 2186)
+++ trunk/code/qcommon/unzip.c 2011-10-21 22:48:53 UTC (rev 2187)
@@ -1250,7 +1250,7 @@
return UNZ_PARAMERROR;
- if ((pfile_in_zip_read_info->read_buffer == NULL))
+ if (pfile_in_zip_read_info->read_buffer == NULL)
return UNZ_END_OF_LIST_OF_FILE;
if (len==0)
return 0;
Modified: trunk/code/renderer/tr_model_iqm.c
===================================================================
--- trunk/code/renderer/tr_model_iqm.c 2011-10-14 17:03:59 UTC (rev 2186)
+++ trunk/code/renderer/tr_model_iqm.c 2011-10-21 22:48:53 UTC (rev 2187)
@@ -284,9 +284,9 @@
LL( triangle->vertex[1] );
LL( triangle->vertex[2] );
- if( triangle->vertex[0] < 0 || triangle->vertex[0] > header->num_vertexes ||
- triangle->vertex[1] < 0 || triangle->vertex[1] > header->num_vertexes ||
- triangle->vertex[2] < 0 || triangle->vertex[2] > header->num_vertexes ) {
+ if( triangle->vertex[0] > header->num_vertexes ||
+ triangle->vertex[1] > header->num_vertexes ||
+ triangle->vertex[2] > header->num_vertexes ) {
return qfalse;
}
}
@@ -323,9 +323,7 @@
mesh->first_vertex + mesh->num_vertexes > header->num_vertexes ||
mesh->first_triangle >= header->num_triangles ||
mesh->first_triangle + mesh->num_triangles > header->num_triangles ||
- mesh->name < 0 ||
mesh->name >= header->num_text ||
- mesh->material < 0 ||
mesh->material >= header->num_text ) {
return qfalse;
}
@@ -354,7 +352,6 @@
if( joint->parent < -1 ||
joint->parent >= (int)header->num_joints ||
- joint->name < 0 ||
joint->name >= (int)header->num_text ) {
return qfalse;
}
Modified: trunk/code/renderer/tr_scene.c
===================================================================
--- trunk/code/renderer/tr_scene.c 2011-10-14 17:03:59 UTC (rev 2186)
+++ trunk/code/renderer/tr_scene.c 2011-10-21 22:48:53 UTC (rev 2187)
@@ -219,7 +219,7 @@
}
return;
}
- if ( ent->reType < 0 || ent->reType >= RT_MAX_REF_ENTITY_TYPE ) {
+ if ( (int)ent->reType < 0 || ent->reType >= RT_MAX_REF_ENTITY_TYPE ) {
ri.Error( ERR_DROP, "RE_AddRefEntityToScene: bad reType %i", ent->reType );
}
More information about the quake3-commits
mailing list