From 2884483bef4298940859b05795e0713f7fb34f6d Mon Sep 17 00:00:00 2001 From: Scott Ehlert Date: Tue, 5 Jun 2007 05:45:48 +0000 Subject: [PATCH] Fixed amb363 - Compiler reports wrong line number for unused global symbols --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40882 --- sourcepawn/compiler/sc1.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sourcepawn/compiler/sc1.c b/sourcepawn/compiler/sc1.c index 7591457e..0119a844 100644 --- a/sourcepawn/compiler/sc1.c +++ b/sourcepawn/compiler/sc1.c @@ -5098,9 +5098,8 @@ static int testsymbols(symbol *root,int level,int testlabs,int testconst) if (sym->parent!=NULL) break; /* hierarchical data type */ if ((sym->usage & (uWRITTEN | uREAD | uSTOCK))==0) { - if (testconst) - errorset(sSETPOS,sym->lnumber); - error(203,sym->name,sym->lnumber); /* symbol isn't used (and not stock) */ + errorset(sSETPOS,sym->lnumber); + error(203,sym->name); /* symbol isn't used (and not stock) */ } else if ((sym->usage & (uREAD | uSTOCK | uPUBLIC))==0) { errorset(sSETPOS,sym->lnumber); error(204,sym->name); /* value assigned to symbol is never used */