[iortcw] 204/497: All: Fix some clang warnings

2017-09-08 Thread Simon McVittie
This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit d49d4bef96ed0e67cf4716f4c674d0e83134fdd9
Author: m4n4t4...@gmail.com 

Date:   Mon Sep 1 01:28:49 2014 +

All: Fix some clang warnings
---
 MP/code/botlib/be_aas_route.c  |  25 +---
 MP/code/botlib/be_aas_routetable.c |   9 ++-
 MP/code/client/cl_avi.c|   2 +
 MP/code/game/g_mover.c |   8 +--
 MP/code/game/g_weapon.c|   4 ++
 MP/code/rend2/tr_animation.c   | 127 -
 MP/code/renderer/tr_animation.c| 127 -
 SP/code/botlib/be_aas_route.c  |  30 ++---
 SP/code/botlib/be_aas_routetable.c |   9 ++-
 SP/code/client/cl_avi.c|   2 +
 SP/code/game/g_weapon.c|   2 +-
 SP/code/rend2/tr_animation.c   | 127 -
 SP/code/renderer/tr_animation.c| 127 -
 13 files changed, 34 insertions(+), 565 deletions(-)

diff --git a/MP/code/botlib/be_aas_route.c b/MP/code/botlib/be_aas_route.c
index d95dbaf..c94bc6a 100644
--- a/MP/code/botlib/be_aas_route.c
+++ b/MP/code/botlib/be_aas_route.c
@@ -51,6 +51,8 @@ If you have questions concerning this license or the 
applicable additional terms
 #include "be_interface.h"
 #include "be_aas_def.h"
 
+#defineLL(x) x=LittleLong(x)
+
 #define ROUTING_DEBUG
 
 //travel time in hundreths of a second = distance * 100 / speed
@@ -1010,7 +1012,7 @@ aas_routingcache_t *AAS_ReadCache( fileHandle_t fp ) {
unsigned char *cache_reachabilities;
 
botimport.FS_Read( , sizeof( size ), fp );
-   size = LittleLong( size );
+   LL( size );
cache = (aas_routingcache_32_t *) AAS_RoutingGetMemory( size );
cache->size = size;
botimport.FS_Read( (unsigned char *)cache + sizeof( size ), size - 
sizeof( size ), fp );
@@ -1244,27 +1246,6 @@ void AAS_FreeRoutingCaches( void ) {
( *aasworld ).areawaypoints = NULL;
 } //end of the function AAS_FreeRoutingCaches
 //===
-// this function could be replaced by a bubble sort or for even faster
-// routing by a B+ tree
-//
-// Parameter:  -
-// Returns:-
-// Changes Globals:-
-//===
-static ID_INLINE void AAS_AddUpdateToList( aas_routingupdate_t 
**updateliststart,
-  
aas_routingupdate_t **updatelistend,
-  
aas_routingupdate_t *update ) {
-   if ( !update->inlist ) {
-   if ( *updatelistend ) {
-   ( *updatelistend )->next = update;
-   } else { *updateliststart = update;}
-   update->prev = *updatelistend;
-   update->next = NULL;
-   *updatelistend = update;
-   update->inlist = qtrue;
-   } //end if
-} //end of the function AAS_AddUpdateToList
-//===
 //
 // Parameter:  -
 // Returns:-
diff --git a/MP/code/botlib/be_aas_routetable.c 
b/MP/code/botlib/be_aas_routetable.c
index ae50487..345bf8d 100644
--- a/MP/code/botlib/be_aas_routetable.c
+++ b/MP/code/botlib/be_aas_routetable.c
@@ -47,6 +47,9 @@ If you have questions concerning this license or the 
applicable additional terms
 #include "be_interface.h"
 #include "be_aas_def.h"
 
+#defineLL(x) x=LittleLong(x)
+#defineLS(x) x=LittleShort(x)
+
 // ugly hack to turn off route-tables, can't find a way to check cvar's
 int disable_routetable = 0;
 
@@ -339,7 +342,7 @@ qboolean AAS_RT_ReadRouteTable( fileHandle_t fp ) {
 
// check ident
AAS_RT_DBG_Read( , sizeof( ident ), fp );
-   ident = LittleLong( ident );
+   LL( ident );
 
if ( ident != RTBID ) {
AAS_Error( "File is not an RTB file\n" );
@@ -349,7 +352,7 @@ qboolean AAS_RT_ReadRouteTable( fileHandle_t fp ) {
 
// check version
AAS_RT_DBG_Read( , sizeof( version ), fp );
-   version = LittleLong( version );
+   LL( version );
 
if ( version != RTBVERSION ) {
AAS_Error( "File is version %i not %i\n", version, RTBVERSION );
@@ -359,7 +362,7 @@ qboolean AAS_RT_ReadRouteTable( fileHandle_t fp ) {
 
// read the CRC check on the AAS data
AAS_RT_DBG_Read( , sizeof( crc ), fp );
-   crc = LittleShort( crc );
+   LS( crc );
 
// calculate a CRC on the AAS areas
crc_aas = CRC_ProcessString( (unsigned char *)( *aasworld ).areas, 
sizeof( aas_area_t ) * ( *aasworld ).numareas );
diff 

[iortcw] 204/497: All: Fix some clang warnings

2016-09-21 Thread Simon McVittie
This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit d49d4bef96ed0e67cf4716f4c674d0e83134fdd9
Author: m4n4t4...@gmail.com 

Date:   Mon Sep 1 01:28:49 2014 +

All: Fix some clang warnings
---
 MP/code/botlib/be_aas_route.c  |  25 +---
 MP/code/botlib/be_aas_routetable.c |   9 ++-
 MP/code/client/cl_avi.c|   2 +
 MP/code/game/g_mover.c |   8 +--
 MP/code/game/g_weapon.c|   4 ++
 MP/code/rend2/tr_animation.c   | 127 -
 MP/code/renderer/tr_animation.c| 127 -
 SP/code/botlib/be_aas_route.c  |  30 ++---
 SP/code/botlib/be_aas_routetable.c |   9 ++-
 SP/code/client/cl_avi.c|   2 +
 SP/code/game/g_weapon.c|   2 +-
 SP/code/rend2/tr_animation.c   | 127 -
 SP/code/renderer/tr_animation.c| 127 -
 13 files changed, 34 insertions(+), 565 deletions(-)

diff --git a/MP/code/botlib/be_aas_route.c b/MP/code/botlib/be_aas_route.c
index d95dbaf..c94bc6a 100644
--- a/MP/code/botlib/be_aas_route.c
+++ b/MP/code/botlib/be_aas_route.c
@@ -51,6 +51,8 @@ If you have questions concerning this license or the 
applicable additional terms
 #include "be_interface.h"
 #include "be_aas_def.h"
 
+#defineLL(x) x=LittleLong(x)
+
 #define ROUTING_DEBUG
 
 //travel time in hundreths of a second = distance * 100 / speed
@@ -1010,7 +1012,7 @@ aas_routingcache_t *AAS_ReadCache( fileHandle_t fp ) {
unsigned char *cache_reachabilities;
 
botimport.FS_Read( , sizeof( size ), fp );
-   size = LittleLong( size );
+   LL( size );
cache = (aas_routingcache_32_t *) AAS_RoutingGetMemory( size );
cache->size = size;
botimport.FS_Read( (unsigned char *)cache + sizeof( size ), size - 
sizeof( size ), fp );
@@ -1244,27 +1246,6 @@ void AAS_FreeRoutingCaches( void ) {
( *aasworld ).areawaypoints = NULL;
 } //end of the function AAS_FreeRoutingCaches
 //===
-// this function could be replaced by a bubble sort or for even faster
-// routing by a B+ tree
-//
-// Parameter:  -
-// Returns:-
-// Changes Globals:-
-//===
-static ID_INLINE void AAS_AddUpdateToList( aas_routingupdate_t 
**updateliststart,
-  
aas_routingupdate_t **updatelistend,
-  
aas_routingupdate_t *update ) {
-   if ( !update->inlist ) {
-   if ( *updatelistend ) {
-   ( *updatelistend )->next = update;
-   } else { *updateliststart = update;}
-   update->prev = *updatelistend;
-   update->next = NULL;
-   *updatelistend = update;
-   update->inlist = qtrue;
-   } //end if
-} //end of the function AAS_AddUpdateToList
-//===
 //
 // Parameter:  -
 // Returns:-
diff --git a/MP/code/botlib/be_aas_routetable.c 
b/MP/code/botlib/be_aas_routetable.c
index ae50487..345bf8d 100644
--- a/MP/code/botlib/be_aas_routetable.c
+++ b/MP/code/botlib/be_aas_routetable.c
@@ -47,6 +47,9 @@ If you have questions concerning this license or the 
applicable additional terms
 #include "be_interface.h"
 #include "be_aas_def.h"
 
+#defineLL(x) x=LittleLong(x)
+#defineLS(x) x=LittleShort(x)
+
 // ugly hack to turn off route-tables, can't find a way to check cvar's
 int disable_routetable = 0;
 
@@ -339,7 +342,7 @@ qboolean AAS_RT_ReadRouteTable( fileHandle_t fp ) {
 
// check ident
AAS_RT_DBG_Read( , sizeof( ident ), fp );
-   ident = LittleLong( ident );
+   LL( ident );
 
if ( ident != RTBID ) {
AAS_Error( "File is not an RTB file\n" );
@@ -349,7 +352,7 @@ qboolean AAS_RT_ReadRouteTable( fileHandle_t fp ) {
 
// check version
AAS_RT_DBG_Read( , sizeof( version ), fp );
-   version = LittleLong( version );
+   LL( version );
 
if ( version != RTBVERSION ) {
AAS_Error( "File is version %i not %i\n", version, RTBVERSION );
@@ -359,7 +362,7 @@ qboolean AAS_RT_ReadRouteTable( fileHandle_t fp ) {
 
// read the CRC check on the AAS data
AAS_RT_DBG_Read( , sizeof( crc ), fp );
-   crc = LittleShort( crc );
+   LS( crc );
 
// calculate a CRC on the AAS areas
crc_aas = CRC_ProcessString( (unsigned char *)( *aasworld ).areas, 
sizeof( aas_area_t ) * ( *aasworld ).numareas );
diff