diff --git a/src/ld65/exports.c b/src/ld65/exports.c index 872db5143..6580033fb 100644 --- a/src/ld65/exports.c +++ b/src/ld65/exports.c @@ -774,16 +774,13 @@ static void PrintUnresolved (ExpCheckFunc F, void* Data) if (E->Expr == 0 && E->ImpCount > 0 && F (E->Name, Data) == 0) { /* Unresolved external */ Import* Imp = E->ImpList; - const char * name = GetString (E->Name); - fprintf (stderr, - "Unresolved external '%s' referenced in:\n", - name); + const char* name = GetString (E->Name); while (Imp) { unsigned J; for (J = 0; J < CollCount (&Imp->RefLines); ++J) { const LineInfo* LI = CollConstAt (&Imp->RefLines, J); fprintf (stderr, - " %s:%u: Error: Unresolved external '%s'\n", + "%s:%u: Error: Unresolved external '%s'\n", GetSourceName (LI), GetSourceLine (LI), name);