Fix a few warnings

This commit is contained in:
Tim Angus 2014-08-30 17:29:09 +01:00
parent c621589157
commit 621a72e698
18 changed files with 76 additions and 74 deletions

View file

@ -1487,7 +1487,7 @@ EasyClientName
char *EasyClientName(int client, char *buf, int size) {
int i;
char *str1, *str2, *ptr, c;
char name[128];
char name[128] = {0};
ClientName(client, name, sizeof(name));

View file

@ -1757,7 +1757,7 @@ BotHarvesterOrders
*/
void BotHarvesterOrders(bot_state_t *bs) {
int numteammates, defenders, attackers, i;
int teammates[MAX_CLIENTS];
int teammates[MAX_CLIENTS] = {0};
char name[MAX_NETNAME];
//sort team mates by travel time to base

View file

@ -1087,7 +1087,6 @@ qboolean BG_CanItemBeGrabbed( int gametype, const entityState_t *ent, const play
// don't pick up if already at max
#ifdef MISSIONPACK
if( bg_itemlist[ps->stats[STAT_PERSISTANT_POWERUP]].giTag == PW_GUARD ) {
upperBound = ps->stats[STAT_MAX_HEALTH];
}
else
#endif

View file

@ -348,6 +348,10 @@ RespawnItem
===============
*/
void RespawnItem( gentity_t *ent ) {
if (!ent) {
return;
}
// randomly select from teamed entities
if (ent->team) {
gentity_t *master;

View file

@ -881,6 +881,10 @@ void Think_SpawnNewDoorTrigger( gentity_t *ent ) {
vec3_t mins, maxs;
int i, best;
if (!ent) {
return;
}
// set all of the slaves as shootable
for ( other = ent ; other ; other = other->teamchain ) {
other->takedamage = qtrue;

View file

@ -132,11 +132,11 @@ UpdateIPBans
*/
static void UpdateIPBans (void)
{
byte b[4];
byte m[4];
byte b[4] = {0};
byte m[4] = {0};
int i,j;
char iplist_final[MAX_CVAR_VALUE_STRING];
char ip[64];
char iplist_final[MAX_CVAR_VALUE_STRING] = {0};
char ip[64] = {0};
*iplist_final = 0;
for (i = 0 ; i < numIPFilters ; i++)
@ -178,7 +178,7 @@ qboolean G_FilterPacket (char *from)
{
int i;
unsigned in;
byte m[4];
byte m[4] = {0};
char *p;
i = 0;