Fixed amb363 - Compiler reports wrong line number for unused global symbols
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40882
This commit is contained in:
parent
a3687d9258
commit
2884483bef
@ -5098,9 +5098,8 @@ static int testsymbols(symbol *root,int level,int testlabs,int testconst)
|
|||||||
if (sym->parent!=NULL)
|
if (sym->parent!=NULL)
|
||||||
break; /* hierarchical data type */
|
break; /* hierarchical data type */
|
||||||
if ((sym->usage & (uWRITTEN | uREAD | uSTOCK))==0) {
|
if ((sym->usage & (uWRITTEN | uREAD | uSTOCK))==0) {
|
||||||
if (testconst)
|
|
||||||
errorset(sSETPOS,sym->lnumber);
|
errorset(sSETPOS,sym->lnumber);
|
||||||
error(203,sym->name,sym->lnumber); /* symbol isn't used (and not stock) */
|
error(203,sym->name); /* symbol isn't used (and not stock) */
|
||||||
} else if ((sym->usage & (uREAD | uSTOCK | uPUBLIC))==0) {
|
} else if ((sym->usage & (uREAD | uSTOCK | uPUBLIC))==0) {
|
||||||
errorset(sSETPOS,sym->lnumber);
|
errorset(sSETPOS,sym->lnumber);
|
||||||
error(204,sym->name); /* value assigned to symbol is never used */
|
error(204,sym->name); /* value assigned to symbol is never used */
|
||||||
|
Loading…
Reference in New Issue
Block a user