From 016008b6df5a1a0283a29ba1e18255e39a229dd5 Mon Sep 17 00:00:00 2001 From: bbbradsmith Date: Wed, 3 May 2023 11:57:50 -0400 Subject: [PATCH 1/2] ca65: Suppress '.size' error for multiply-defined symbols --- src/ca65/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ca65/main.c b/src/ca65/main.c index 7183ff046..d45201cad 100644 --- a/src/ca65/main.c +++ b/src/ca65/main.c @@ -858,7 +858,11 @@ static void OneLine (void) /* The line has switched the segment */ Size = 0; } - DefSizeOfSymbol (Sym, Size); + /* Suppress .size Symbol if this Symbol already has a multiply-defined error, + ** as it will only create its own additional unnecessary error. + */ + if ((Sym->Flags & SF_MULTDEF) == 0) + DefSizeOfSymbol (Sym, Size); } /* Line separator must come here */ From 440c91fad96e6b94cdec1e4cf249dc0ca0d28fe6 Mon Sep 17 00:00:00 2001 From: bbbradsmith Date: Wed, 3 May 2023 14:11:30 -0400 Subject: [PATCH 2/2] braces for 1-line if --- src/ca65/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ca65/main.c b/src/ca65/main.c index d45201cad..fedbb0d4b 100644 --- a/src/ca65/main.c +++ b/src/ca65/main.c @@ -861,8 +861,9 @@ static void OneLine (void) /* Suppress .size Symbol if this Symbol already has a multiply-defined error, ** as it will only create its own additional unnecessary error. */ - if ((Sym->Flags & SF_MULTDEF) == 0) + if ((Sym->Flags & SF_MULTDEF) == 0) { DefSizeOfSymbol (Sym, Size); + } } /* Line separator must come here */