]> git.sur5r.net Git - cc65/commitdiff
Ignore internal symbols when generating warnings about unused symbols
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 4 Dec 2005 22:03:35 +0000 (22:03 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 4 Dec 2005 22:03:35 +0000 (22:03 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@3680 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/ca65/symtab.c

index bfc1ef9b20aaa8af6c13969d6d63569b2fbddcf4..ec853248c276ffdce85e1148177b3498c4e9d23a 100644 (file)
@@ -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 */