public variables behaviour

stops unused warnings from being triggered for public variables
This commit is contained in:
Yashas 2016-12-26 21:30:32 +05:30 committed by GitHub
parent 111785e767
commit 602178a0b5

View File

@ -4690,7 +4690,7 @@ static int testsymbols(symbol *root,int level,int testlabs,int testconst)
/* a variable */
if (sym->parent!=NULL)
break; /* hierarchical data type */
if ((sym->usage & (uWRITTEN | uREAD | uSTOCK))==0) {
if ((sym->usage & (uWRITTEN | uREAD | uSTOCK | uPUBLIC))==0) {
if (testconst)
errorset(sSETPOS,sym->lnumber);
error(203,sym->name,sym->lnumber); /* symbol isn't used (and not stock) */