ref: a265b85d9dabc026778b3ef42de08d6ff5bcd2b6
parent: 28abf03c0a20ab47fee16c366539579434ae88ca
author: Rangi <[email protected]>
date: Sun Mar 28 11:55:32 EDT 2021
Report "1 error", not "1 errors", when assembly is aborted This matches other such pluralized error messages
--- a/src/asm/main.c
+++ b/src/asm/main.c
@@ -353,7 +353,8 @@
sect_CheckUnionClosed();
if (nbErrors != 0)
- errx(1, "Assembly aborted (%u errors)!", nbErrors);
+ errx(1, "Assembly aborted (%u error%s)!", nbErrors,
+ nbErrors == 1 ? "" : "s");
// If parse aborted due to missing an include, and `-MG` was given, exit normally
if (oFailedOnMissingInclude)
--- a/test/asm/align-large-ofs.err
+++ b/test/asm/align-large-ofs.err
@@ -1,3 +1,3 @@
ERROR: align-large-ofs.asm(2):
Alignment offset (2) must be smaller than alignment size (2)
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/assert-nosect-bank.err
+++ b/test/asm/assert-nosect-bank.err
@@ -1,3 +1,3 @@
ERROR: assert-nosect-bank.asm(1):
PC has no bank outside a section
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/[email protected]
+++ b/test/asm/[email protected]
@@ -1,3 +1,3 @@
ERROR: [email protected](1):
PC has no value outside a section
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/deprecated-pi.err
+++ b/test/asm/deprecated-pi.err
@@ -2,4 +2,4 @@
`_PI` is deprecated; use 3.14159
ERROR: deprecated-pi.asm(3):
Built-in symbol '_PI' cannot be purged
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/ds-bad.err
+++ b/test/asm/ds-bad.err
@@ -2,4 +2,4 @@
Expected constant expression: 'unknown' is not constant at assembly time
warning: ds-bad.asm(4): [-Wtruncation]
Expression must be 8-bit
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/fragment-align.err
+++ b/test/asm/fragment-align.err
@@ -1,3 +1,3 @@
ERROR: fragment-align.asm(25):
Section's alignment fails required alignment (offset from section start = $0004)
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/garbage_char.err
+++ b/test/asm/garbage_char.err
@@ -1,3 +1,3 @@
ERROR: garbage_char.asm(1):
Unknown character 0xFF
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/[email protected]
+++ b/test/asm/[email protected]
@@ -1,3 +1,3 @@
ERROR: [email protected](1):
PC has no value outside a section
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/incbin-empty-bad.err
+++ b/test/asm/incbin-empty-bad.err
@@ -1,3 +1,3 @@
ERROR: incbin-empty-bad.asm(3):
Specified range in INCBIN is out of bounds (0 + 1 > 0)
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/incbin-end-bad.err
+++ b/test/asm/incbin-end-bad.err
@@ -1,3 +1,3 @@
ERROR: incbin-end-bad.asm(3):
Specified range in INCBIN is out of bounds (123 + 1 > 123)
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/label-outside-section.err
+++ b/test/asm/label-outside-section.err
@@ -1,3 +1,3 @@
ERROR: label-outside-section.asm(1):
Label "bad" created outside of a SECTION
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/label-redefinition.err
+++ b/test/asm/label-redefinition.err
@@ -1,3 +1,3 @@
ERROR: label-redefinition.asm(7):
'Sym' already defined at label-redefinition.asm(6) -> label-redefinition.asm::m(4)
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/line-continuation-whitespace.err
+++ b/test/asm/line-continuation-whitespace.err
@@ -1,3 +1,3 @@
ERROR: line-continuation-whitespace.asm(7):
Label "foo" created outside of a SECTION
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/line-continuation.err
+++ b/test/asm/line-continuation.err
@@ -1,3 +1,3 @@
ERROR: line-continuation.asm(7):
Label "foo" created outside of a SECTION
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/load-rom.err
+++ b/test/asm/load-rom.err
@@ -1,3 +1,3 @@
ERROR: load-rom.asm(3):
`LOAD` blocks cannot create a ROM section
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/local-purge.err
+++ b/test/asm/local-purge.err
@@ -1,3 +1,3 @@
ERROR: local-purge.asm(8):
Interpolated symbol ".loc" does not exist
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/local-without-parent.err
+++ b/test/asm/local-without-parent.err
@@ -1,3 +1,3 @@
ERROR: local-without-parent.asm(2):
Local label '.test' in main scope
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/local-wrong-parent.err
+++ b/test/asm/local-wrong-parent.err
@@ -1,3 +1,3 @@
ERROR: local-wrong-parent.asm(5):
Not currently in the scope of 'WrongParent'
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/macro-arg-in-string.err
+++ b/test/asm/macro-arg-in-string.err
@@ -1,3 +1,3 @@
ERROR: macro-arg-in-string.asm(12):
Illegal character escape '!'
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/multi-line-strings.err
+++ b/test/asm/multi-line-strings.err
@@ -2,4 +2,4 @@
Unterminated string
warning: multi-line-strings.asm(35): [-Wuser]
check the line number
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/narg-nosect.err
+++ b/test/asm/narg-nosect.err
@@ -1,3 +1,3 @@
ERROR: narg-nosect.asm(1):
_NARG does not make sense outside of a macro
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/nested-brackets.err
+++ b/test/asm/nested-brackets.err
@@ -1,3 +1,3 @@
ERROR: nested-brackets.asm(5):
Missing }
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/null-in-macro.err
+++ b/test/asm/null-in-macro.err
@@ -1,3 +1,3 @@
ERROR: null-in-macro.asm(4) -> null-in-macro.asm::foo(2):
Unknown character 0x00
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/period.err
+++ b/test/asm/period.err
@@ -1,3 +1,3 @@
ERROR: period.asm(5):
syntax error, unexpected .
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/period.simple.err
+++ b/test/asm/period.simple.err
@@ -1,3 +1,3 @@
ERROR: period.asm(5):
syntax error
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/purge-refs.err
+++ b/test/asm/purge-refs.err
@@ -1,3 +1,3 @@
ERROR: purge-refs.asm(6):
Symbol "Floating" is referenced and thus cannot be purged
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/purge.err
+++ b/test/asm/purge.err
@@ -1,3 +1,3 @@
ERROR: purge.asm(9):
Symbol "Referenced" is referenced and thus cannot be purged
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/redef-equs.err
+++ b/test/asm/redef-equs.err
@@ -1,3 +1,3 @@
ERROR: redef-equs.asm(23):
'N' already defined as non-EQUS at redef-equs.asm(22)
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/string-formatting.err
+++ b/test/asm/string-formatting.err
@@ -1,3 +1,3 @@
ERROR: string-formatting.asm(10):
Formatting string with prefix flag '#'
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/sym-collision.err
+++ b/test/asm/sym-collision.err
@@ -1,3 +1,3 @@
ERROR: sym-collision.asm(26):
Interpolated symbol "dork" does not exist
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/syntax-error-eof-newline.err
+++ b/test/asm/syntax-error-eof-newline.err
@@ -1,3 +1,3 @@
ERROR: syntax-error-eof-newline.asm(5) -> syntax-error-eof-newline.inc(1):
syntax error, unexpected newline
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/syntax-error-eof-newline.simple.err
+++ b/test/asm/syntax-error-eof-newline.simple.err
@@ -1,3 +1,3 @@
ERROR: syntax-error-eof-newline.asm(5) -> syntax-error-eof-newline.inc(1):
syntax error
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/syntax-error.err
+++ b/test/asm/syntax-error.err
@@ -1,3 +1,3 @@
ERROR: syntax-error.asm(2):
syntax error, unexpected a
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/asm/syntax-error.simple.err
+++ b/test/asm/syntax-error.simple.err
@@ -1,3 +1,3 @@
ERROR: syntax-error.asm(2):
syntax error
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!
--- a/test/link/section-union/assert.out
+++ b/test/link/section-union/assert.out
@@ -3,4 +3,4 @@
---
ERROR: <stdin>(30):
Assertion failed: Force failing the build
-error: Assembly aborted (1 errors)!
+error: Assembly aborted (1 error)!