From a7c58633dbabe5f81d8f485d6615fb8e8bf60c93 Mon Sep 17 00:00:00 2001 From: Daniel_Cortez Date: Wed, 3 Oct 2018 20:30:45 +0700 Subject: [PATCH] Fix the compiler suggesting unimplemented variables --- source/compiler/sc5.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/compiler/sc5.c b/source/compiler/sc5.c index 5af6d61..47772a2 100644 --- a/source/compiler/sc5.c +++ b/source/compiler/sc5.c @@ -510,6 +510,8 @@ static int find_closest_symbol_table(const char *name,const symbol *root,int sym for (sym=root->next; sym!=NULL; sym=sym->next) { if (sym->fnumber!=-1 && sym->fnumber!=fcurrent) continue; + if ((sym->usage & uDEFINE)==0) + continue; ident=sym->ident; if (symboltype==essNONLABEL) { if (ident==iLABEL) @@ -524,10 +526,10 @@ static int find_closest_symbol_table(const char *name,const symbol *root,int sym if (ident!=iCONSTEXPR) continue; } else if (symboltype==essFUNCTN) { - if ((ident!=iFUNCTN && ident!=iREFFUNC) || (sym->usage & uDEFINE)==0) + if (ident!=iFUNCTN && ident!=iREFFUNC) continue; } else if (symboltype==essLABEL) { - if (ident!=iLABEL || (sym->usage & uDEFINE)==0) + if (ident!=iLABEL) continue; } /* if */ funcdisplayname(symname,sym->name);