From: cuz Date: Sun, 4 Dec 2005 22:03:35 +0000 (+0000) Subject: Ignore internal symbols when generating warnings about unused symbols X-Git-Tag: V2.12.0~173 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5227580f46baeba096b42fb10466623629768b51;p=cc65 Ignore internal symbols when generating warnings about unused symbols git-svn-id: svn://svn.cc65.org/cc65/trunk@3680 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/ca65/symtab.c b/src/ca65/symtab.c index bfc1ef9b2..ec853248c 100644 --- a/src/ca65/symtab.c +++ b/src/ca65/symtab.c @@ -549,9 +549,12 @@ void SymCheck (void) /* Check for defined symbols that were never referenced */ if ((S->Flags & SF_DEFINED) != 0 && (S->Flags & SF_REFERENCED) == 0) { - PWarning (&S->Pos, 2, - "Symbol `%s' is defined but never used", - GetString (S->Name)); + const char* Name = GetString (S->Name); + if (Name[0] != '.') { /* Ignore internals */ + PWarning (&S->Pos, 2, + "Symbol `%s' is defined but never used", + GetString (S->Name)); + } } /* Assign an index to all imports */