mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +00:00
fix annoying warning about temps not being freed when pointers are used.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4557 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
6defcc7a5f
commit
5f1ec064dc
1 changed files with 3 additions and 0 deletions
|
@ -154,6 +154,7 @@ QCC_ref_t *QCC_PR_ParseRefValue (QCC_ref_t *refbuf, QCC_type_t *assumeclass, pbo
|
||||||
QCC_ref_t *QCC_PR_ParseRefArrayPointer (QCC_ref_t *refbuf, QCC_ref_t *d, pbool allowarrayassign, pbool makestructpointers);
|
QCC_ref_t *QCC_PR_ParseRefArrayPointer (QCC_ref_t *refbuf, QCC_ref_t *d, pbool allowarrayassign, pbool makestructpointers);
|
||||||
QCC_ref_t *QCC_PR_BuildRef(QCC_ref_t *retbuf, unsigned int reftype, QCC_def_t *base, QCC_def_t *index, QCC_type_t *cast, pbool readonly);
|
QCC_ref_t *QCC_PR_BuildRef(QCC_ref_t *retbuf, unsigned int reftype, QCC_def_t *base, QCC_def_t *index, QCC_type_t *cast, pbool readonly);
|
||||||
QCC_def_t *QCC_StoreToRef(QCC_ref_t *dest, QCC_def_t *source, pbool readable, pbool preservedest);
|
QCC_def_t *QCC_StoreToRef(QCC_ref_t *dest, QCC_def_t *source, pbool readable, pbool preservedest);
|
||||||
|
void QCC_PR_DiscardRef(QCC_ref_t *ref);
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -6217,6 +6218,8 @@ QCC_def_t *QCC_RefToDef(QCC_ref_t *ref, pbool freetemps)
|
||||||
case REF_POINTER:
|
case REF_POINTER:
|
||||||
tmp = QCC_GetTemp(ref->cast);
|
tmp = QCC_GetTemp(ref->cast);
|
||||||
QCC_LoadFromPointer(tmp->ofs, ref->base->ofs, ref->index?ref->index->ofs:0, ref->cast);
|
QCC_LoadFromPointer(tmp->ofs, ref->base->ofs, ref->index?ref->index->ofs:0, ref->cast);
|
||||||
|
if (freetemps)
|
||||||
|
QCC_PR_DiscardRef(ref);
|
||||||
return tmp;
|
return tmp;
|
||||||
case REF_FIELD:
|
case REF_FIELD:
|
||||||
return QCC_PR_ExpandField(ref->base, ref->index, ref->cast, freetemps?0:(STFL_PRESERVEA|STFL_PRESERVEB));
|
return QCC_PR_ExpandField(ref->base, ref->index, ref->cast, freetemps?0:(STFL_PRESERVEA|STFL_PRESERVEB));
|
||||||
|
|
Loading…
Reference in a new issue