Fixed compilation warnings (mostly size_t->int, signed/unsigned conversions).

This commit is contained in:
Artem Kharytoniuk
2014-07-08 23:32:09 +03:00
parent 0f690ecf79
commit 3cc9bcd542
70 changed files with 316 additions and 311 deletions

View File

@@ -567,7 +567,7 @@ static void SV_Status_f( void ) {
// TTimo adding a ^7 to reset the color
// NOTE: colored names in status breaks the padding (WONTFIX)
Com_Printf ("^7");
l = 16 - strlen(cl->name);
l = 16 - (int)strlen(cl->name);
for (j=0 ; j<l ; j++)
Com_Printf (" ");
@@ -575,7 +575,7 @@ static void SV_Status_f( void ) {
s = NET_AdrToString( cl->netchan.remoteAddress );
Com_Printf ("%s", s);
l = 22 - strlen(s);
l = 22 - (int)strlen(s);
for (j=0 ; j<l ; j++)
Com_Printf (" ");

View File

@@ -1142,7 +1142,7 @@ void SV_UserinfoChanged( client_t *cl ) {
val = Info_ValueForKey (cl->userinfo, "handicap");
if (strlen(val)) {
i = atoi(val);
if (i<=0 || i>100 || strlen(val) > 4) {
if (i<=0 || i>100 || (int)strlen(val) > 4) {
Info_SetValueForKey( cl->userinfo, "handicap", "100" );
}
}

View File

@@ -64,7 +64,7 @@ void SV_SetConfigstring (int index, const char *val) {
continue;
}
len = strlen( val );
len = (int)strlen( val );
if( len >= maxChunkSize ) {
int sent = 0;
int remaining = len;

View File

@@ -100,7 +100,7 @@ int SV_ReplacePendingServerCommands( client_t *client, const char *cmd ) {
for ( i = client->reliableSent+1; i <= client->reliableSequence; i++ ) {
index = i & ( MAX_RELIABLE_COMMANDS - 1 );
//
if ( !Q_strncmp(cmd, client->reliableCommands[ index ], strlen("cs")) ) {
if ( !Q_strncmp(cmd, client->reliableCommands[ index ], (int)strlen("cs")) ) {
sscanf(cmd, "cs %i", &csnum1);
sscanf(client->reliableCommands[ index ], "cs %i", &csnum2);
if ( csnum1 == csnum2 ) {
@@ -343,7 +343,7 @@ void SVC_Status( netadr_t from ) {
ps = SV_GameClientNum( i );
Com_sprintf (player, sizeof(player), "%i %i \"%s\"\n",
ps->persistant[PERS_SCORE], cl->ping, cl->name);
playerLength = strlen(player);
playerLength = (int)strlen(player);
if (statusLength + playerLength >= sizeof(status) ) {
break; // can't hold any more
}