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

@@ -84,7 +84,7 @@ libvar_t *LibVarAlloc(char *var_name)
{
libvar_t *v;
v = (libvar_t *) GetMemory(sizeof(libvar_t) + strlen(var_name) + 1);
v = (libvar_t *) GetMemory(sizeof(libvar_t) + (int)strlen(var_name) + 1);
Com_Memset(v, 0, sizeof(libvar_t));
v->name = (char *) v + sizeof(libvar_t);
strcpy(v->name, var_name);
@@ -194,7 +194,7 @@ libvar_t *LibVar(char *var_name, char *value)
//create new variable
v = LibVarAlloc(var_name);
//variable string
v->string = (char *) GetMemory(strlen(value) + 1);
v->string = (char *) GetMemory((int)strlen(value) + 1);
strcpy(v->string, value);
//the value
v->value = LibVarStringValue(v->string);
@@ -249,7 +249,7 @@ void LibVarSet(char *var_name, char *value)
v = LibVarAlloc(var_name);
} //end else
//variable string
v->string = (char *) GetMemory(strlen(value) + 1);
v->string = (char *) GetMemory((int)strlen(value) + 1);
strcpy(v->string, value);
//the value
v->value = LibVarStringValue(v->string);