mirror of
https://github.com/UberGames/rpgxEF.git
synced 2025-04-22 17:00:53 +00:00
fixed warnings
This commit is contained in:
parent
d15d902aaa
commit
2c91fb8df7
3 changed files with 13 additions and 5 deletions
|
@ -1396,7 +1396,7 @@ static void G_LoadLocationsFile( void )
|
|||
return;
|
||||
}
|
||||
} else {
|
||||
if(!result) {
|
||||
if(result == 0) {
|
||||
G_Printf(S_COLOR_RED "ERROR: Unexpected end of file.\n");
|
||||
free(buffer);
|
||||
bgLex_destroy(lex);
|
||||
|
@ -1420,7 +1420,7 @@ static void G_LoadLocationsFile( void )
|
|||
return;
|
||||
}
|
||||
|
||||
ent->classname = "target_location";
|
||||
ent->classname = G_NewString("target_location");
|
||||
|
||||
//copy position data
|
||||
VectorCopy( origin, ent->s.origin );
|
||||
|
@ -1443,7 +1443,7 @@ static void G_LoadLocationsFile( void )
|
|||
rest = 0;
|
||||
|
||||
if(lex->morphem->type == LMT_SYMBOL && lex->morphem->data.symbol == LSYM_SEMICOLON) {
|
||||
if(!bgLex_lex(lex)) {
|
||||
if(bgLex_lex(lex) == 0) {
|
||||
G_Printf(S_COLOR_RED "ERROR: Unexpected end of file.\n");
|
||||
free(buffer);
|
||||
bgLex_destroy(lex);
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
static char memoryPool[POOLSIZE];
|
||||
static int allocPoint;
|
||||
|
||||
void *G_Alloc( int size ) {
|
||||
/*@shared@*/ /*@null@*/ void *G_Alloc( int size ) {
|
||||
char *p;
|
||||
|
||||
if ( g_debugAlloc.integer ) {
|
||||
|
|
|
@ -512,14 +512,22 @@ Builds a copy of the string, translating \n to real linefeeds
|
|||
so message texts can be multi-line
|
||||
=============
|
||||
*/
|
||||
char *G_NewString( const char *string ) {
|
||||
/*@shared@*/ /*@null@*/ char *G_NewString( /*@null@*/ const char *string ) {
|
||||
char *newb, *new_p;
|
||||
int i,l;
|
||||
|
||||
if(string == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
l = strlen(string) + 1;
|
||||
|
||||
newb = (char *)G_Alloc( l );
|
||||
|
||||
if(newb == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
new_p = newb;
|
||||
|
||||
// turn \n into a real linefeed
|
||||
|
|
Loading…
Reference in a new issue