mirror of
https://github.com/ioquake/ioq3.git
synced 2025-06-02 01:42:12 +00:00
Fix some of the things clang --analyze flagged
This commit is contained in:
parent
352cd151e0
commit
98360bcd57
34 changed files with 58 additions and 112 deletions
|
@ -414,7 +414,6 @@ int PC_ReadDefineParms(source_t *source, define_t *define, token_t **parms, int
|
|||
if (indent <= 0)
|
||||
{
|
||||
if (lastcomma) SourceWarning(source, "too many comma's");
|
||||
lastcomma = 1;
|
||||
break;
|
||||
} //end if
|
||||
} //end if
|
||||
|
@ -783,7 +782,7 @@ int PC_ExpandBuiltinDefine(source_t *source, token_t *deftoken, define_t *define
|
|||
int PC_ExpandDefine(source_t *source, token_t *deftoken, define_t *define,
|
||||
token_t **firsttoken, token_t **lasttoken)
|
||||
{
|
||||
token_t *parms[MAX_DEFINEPARMS], *dt, *pt, *t;
|
||||
token_t *parms[MAX_DEFINEPARMS] = { NULL }, *dt, *pt, *t;
|
||||
token_t *t1, *t2, *first, *last, *nextpt, token;
|
||||
int parmnum, i;
|
||||
|
||||
|
@ -1209,12 +1208,6 @@ int PC_Directive_define(source_t *source)
|
|||
//unread the define name before executing the #undef directive
|
||||
PC_UnreadSourceToken(source, &token);
|
||||
if (!PC_Directive_undef(source)) return qfalse;
|
||||
//if the define was not removed (define->flags & DEFINE_FIXED)
|
||||
#if DEFINEHASHING
|
||||
define = PC_FindHashedDefine(source->definehash, token.string);
|
||||
#else
|
||||
define = PC_FindDefine(source->defines, token.string);
|
||||
#endif //DEFINEHASHING
|
||||
} //end if
|
||||
//allocate define
|
||||
define = (define_t *) GetMemory(sizeof(define_t));
|
||||
|
@ -2096,7 +2089,6 @@ int PC_EvaluateTokens(source_t *source, token_t *tokens, signed long int *intval
|
|||
if (v->prev) v->prev->next = v->next;
|
||||
else firstvalue = v->next;
|
||||
if (v->next) v->next->prev = v->prev;
|
||||
else lastvalue = v->prev;
|
||||
//FreeMemory(v);
|
||||
FreeValue(v);
|
||||
} //end if
|
||||
|
@ -2104,7 +2096,6 @@ int PC_EvaluateTokens(source_t *source, token_t *tokens, signed long int *intval
|
|||
if (o->prev) o->prev->next = o->next;
|
||||
else firstoperator = o->next;
|
||||
if (o->next) o->next->prev = o->prev;
|
||||
else lastoperator = o->prev;
|
||||
//FreeMemory(o);
|
||||
FreeOperator(o);
|
||||
} //end while
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue