From 5227580f46baeba096b42fb10466623629768b51 Mon Sep 17 00:00:00 2001 From: cuz Date: Sun, 4 Dec 2005 22:03:35 +0000 Subject: [PATCH] Ignore internal symbols when generating warnings about unused symbols git-svn-id: svn://svn.cc65.org/cc65/trunk@3680 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ca65/symtab.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 */ -- 2.39.5