Format RGBFIX and RGBGFX warnings/errors the same way as RGBASM and RGBLINK

This commit is contained in:
Rangi42
2025-08-11 15:16:00 -04:00
parent 02310489c6
commit 30a8503dcd
52 changed files with 105 additions and 186 deletions

View File

@@ -75,22 +75,26 @@ void warning(WarningID id, char const *fmt, ...) {
case WarningBehavior::ENABLED: case WarningBehavior::ENABLED:
style_Set(stderr, STYLE_YELLOW, true); style_Set(stderr, STYLE_YELLOW, true);
fprintf(stderr, "warning: [-W%s]\n ", flag); fputs("warning: ", stderr);
style_Reset(stderr); style_Reset(stderr);
va_start(ap, fmt); va_start(ap, fmt);
vfprintf(stderr, fmt, ap); vfprintf(stderr, fmt, ap);
va_end(ap); va_end(ap);
putc('\n', stderr); style_Set(stderr, STYLE_YELLOW, true);
fprintf(stderr, " [-W%s]\n", flag);
style_Reset(stderr);
break; break;
case WarningBehavior::ERROR: case WarningBehavior::ERROR:
style_Set(stderr, STYLE_RED, true); style_Set(stderr, STYLE_RED, true);
fprintf(stderr, "error: [-Werror=%s]\n ", flag); fputs("error: ", stderr);
style_Reset(stderr); style_Reset(stderr);
va_start(ap, fmt); va_start(ap, fmt);
vfprintf(stderr, fmt, ap); vfprintf(stderr, fmt, ap);
va_end(ap); va_end(ap);
putc('\n', stderr); style_Set(stderr, STYLE_RED, true);
fprintf(stderr, " [-Werror=%s]\n", flag);
style_Reset(stderr);
warnings.incrementErrors(); warnings.incrementErrors();
break; break;

View File

@@ -84,22 +84,26 @@ void warning(WarningID id, char const *fmt, ...) {
case WarningBehavior::ENABLED: case WarningBehavior::ENABLED:
style_Set(stderr, STYLE_YELLOW, true); style_Set(stderr, STYLE_YELLOW, true);
fprintf(stderr, "warning: [-W%s]\n ", flag); fputs("warning: ", stderr);
style_Reset(stderr); style_Reset(stderr);
va_start(ap, fmt); va_start(ap, fmt);
vfprintf(stderr, fmt, ap); vfprintf(stderr, fmt, ap);
va_end(ap); va_end(ap);
putc('\n', stderr); style_Set(stderr, STYLE_YELLOW, true);
fprintf(stderr, " [-W%s]\n", flag);
style_Reset(stderr);
break; break;
case WarningBehavior::ERROR: case WarningBehavior::ERROR:
style_Set(stderr, STYLE_RED, true); style_Set(stderr, STYLE_RED, true);
fprintf(stderr, "error: [-Werror=%s]\n ", flag); fputs("error: ", stderr);
style_Reset(stderr); style_Reset(stderr);
va_start(ap, fmt); va_start(ap, fmt);
vfprintf(stderr, fmt, ap); vfprintf(stderr, fmt, ap);
va_end(ap); va_end(ap);
putc('\n', stderr); style_Set(stderr, STYLE_YELLOW, true);
fprintf(stderr, " [-Werror=%s]\n", flag);
style_Reset(stderr);
warnings.incrementErrors(); warnings.incrementErrors();
break; break;

View File

@@ -1,2 +1 @@
warning: [-Wmbc] warning: MBC "(unknown)" has no RAM, but RAM size was set to 2 [-Wmbc]
MBC "(unknown)" has no RAM, but RAM size was set to 2

View File

@@ -1,2 +1 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the CGB flag [-Woverwrite]
Overwrote a non-zero byte in the CGB flag

View File

@@ -1,2 +1 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the CGB flag [-Woverwrite]
Overwrote a non-zero byte in the CGB flag

View File

@@ -1,2 +1 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the logo [-Woverwrite]
Overwrote a non-zero byte in the logo

View File

@@ -1,2 +1 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the cartridge type [-Woverwrite]
Overwrote a non-zero byte in the cartridge type

View File

@@ -1,3 +1,2 @@
warning: 'l' overriding 'L' in fix spec warning: 'l' overriding 'L' in fix spec
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the Nintendo logo [-Woverwrite]
Overwrote a non-zero byte in the Nintendo logo

View File

@@ -1,4 +1,2 @@
warning: [-Wtruncation] warning: Truncating game ID "FOUR!" to 4 chars [-Wtruncation]
Truncating game ID "FOUR!" to 4 chars warning: Overwrote a non-zero byte in the manufacturer code [-Woverwrite]
warning: [-Woverwrite]
Overwrote a non-zero byte in the manufacturer code

View File

@@ -1,2 +1 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the manufacturer code [-Woverwrite]
Overwrote a non-zero byte in the manufacturer code

View File

@@ -1,2 +1 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the global checksum [-Woverwrite]
Overwrote a non-zero byte in the global checksum

View File

@@ -1,2 +1 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the global checksum [-Woverwrite]
Overwrote a non-zero byte in the global checksum

View File

@@ -1,2 +1 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the global checksum [-Woverwrite]
Overwrote a non-zero byte in the global checksum

View File

@@ -1,2 +1 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the global checksum [-Woverwrite]
Overwrote a non-zero byte in the global checksum

View File

@@ -1,4 +1,2 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the CGB flag [-Woverwrite]
Overwrote a non-zero byte in the CGB flag warning: Overwrote a non-zero byte in the header checksum [-Woverwrite]
warning: [-Woverwrite]
Overwrote a non-zero byte in the header checksum

View File

@@ -1,2 +1 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the header checksum [-Woverwrite]
Overwrote a non-zero byte in the header checksum

View File

@@ -1,2 +1 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the header checksum [-Woverwrite]
Overwrote a non-zero byte in the header checksum

View File

@@ -1,2 +1 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the destination code [-Woverwrite]
Overwrote a non-zero byte in the destination code

View File

@@ -1,2 +1 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the Nintendo logo [-Woverwrite]
Overwrote a non-zero byte in the Nintendo logo

View File

@@ -1,2 +1 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the Nintendo logo [-Woverwrite]
Overwrote a non-zero byte in the Nintendo logo

View File

@@ -1,2 +1 @@
warning: [-Wmbc] warning: MBC "ROM+RAM+BATTERY" is under-specified and poorly supported [-Wmbc]
MBC "ROM+RAM+BATTERY" is under-specified and poorly supported

View File

@@ -1,2 +1 @@
warning: [-Wmbc] warning: MBC "ROM+RAM" is under-specified and poorly supported [-Wmbc]
MBC "ROM+RAM" is under-specified and poorly supported

View File

@@ -1,2 +1 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the cartridge type [-Woverwrite]
Overwrote a non-zero byte in the cartridge type

View File

@@ -1,6 +1,3 @@
warning: [-Wmbc] warning: MBC "ROM" has no RAM, but RAM size was set to 2 [-Wmbc]
MBC "ROM" has no RAM, but RAM size was set to 2 warning: Overwrote a non-zero byte in the cartridge type [-Woverwrite]
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the RAM size [-Woverwrite]
Overwrote a non-zero byte in the cartridge type
warning: [-Woverwrite]
Overwrote a non-zero byte in the RAM size

View File

@@ -1,4 +1,2 @@
warning: [-Wtruncation] warning: Truncating new licensee "HOMEBREW" to 2 chars [-Wtruncation]
Truncating new licensee "HOMEBREW" to 2 chars warning: Overwrote a non-zero byte in the new licensee code [-Woverwrite]
warning: [-Woverwrite]
Overwrote a non-zero byte in the new licensee code

View File

@@ -1,2 +1 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the new licensee code [-Woverwrite]
Overwrote a non-zero byte in the new licensee code

View File

@@ -1,2 +1 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the old licensee code [-Woverwrite]
Overwrote a non-zero byte in the old licensee code

View File

@@ -1,2 +1 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the old licensee code [-Woverwrite]
Overwrote a non-zero byte in the old licensee code

View File

@@ -1,2 +1 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the RAM size [-Woverwrite]
Overwrote a non-zero byte in the RAM size

View File

@@ -1,6 +1,3 @@
warning: [-Wmbc] warning: MBC "MBC3+RAM" has RAM, but RAM size was set to 0 [-Wmbc]
MBC "MBC3+RAM" has RAM, but RAM size was set to 0 warning: Overwrote a non-zero byte in the cartridge type [-Woverwrite]
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the RAM size [-Woverwrite]
Overwrote a non-zero byte in the cartridge type
warning: [-Woverwrite]
Overwrote a non-zero byte in the RAM size

View File

@@ -1,4 +1,2 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the cartridge type [-Woverwrite]
Overwrote a non-zero byte in the cartridge type warning: Overwrote a non-zero byte in the RAM size [-Woverwrite]
warning: [-Woverwrite]
Overwrote a non-zero byte in the RAM size

View File

@@ -1,4 +1,2 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the cartridge type [-Woverwrite]
Overwrote a non-zero byte in the cartridge type warning: Overwrote a non-zero byte in the RAM size [-Woverwrite]
warning: [-Woverwrite]
Overwrote a non-zero byte in the RAM size

View File

@@ -1,6 +1,3 @@
warning: [-Wsgb] warning: SGB compatibility enabled, but old licensee is 0x45, not 0x33 [-Wsgb]
SGB compatibility enabled, but old licensee is 0x45, not 0x33 warning: Overwrote a non-zero byte in the SGB flag [-Woverwrite]
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the old licensee code [-Woverwrite]
Overwrote a non-zero byte in the SGB flag
warning: [-Woverwrite]
Overwrote a non-zero byte in the old licensee code

View File

@@ -1,4 +1,2 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the SGB flag [-Woverwrite]
Overwrote a non-zero byte in the SGB flag warning: SGB compatibility enabled, but old licensee was 0xc5, not 0x33 [-Wsgb]
warning: [-Wsgb]
SGB compatibility enabled, but old licensee was 0xc5, not 0x33

View File

@@ -1,2 +1 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the SGB flag [-Woverwrite]
Overwrote a non-zero byte in the SGB flag

View File

@@ -1,6 +1,3 @@
warning: [-Wtruncation] warning: Truncating title "0123456789ABCDEF" to 15 chars [-Wtruncation]
Truncating title "0123456789ABCDEF" to 15 chars warning: Overwrote a non-zero byte in the title [-Woverwrite]
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the CGB flag [-Woverwrite]
Overwrote a non-zero byte in the title
warning: [-Woverwrite]
Overwrote a non-zero byte in the CGB flag

View File

@@ -1,6 +1,3 @@
warning: [-Wtruncation] warning: Truncating title "0123456789ABCDEF" to 15 chars [-Wtruncation]
Truncating title "0123456789ABCDEF" to 15 chars warning: Overwrote a non-zero byte in the title [-Woverwrite]
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the CGB flag [-Woverwrite]
Overwrote a non-zero byte in the title
warning: [-Woverwrite]
Overwrote a non-zero byte in the CGB flag

View File

@@ -1,6 +1,3 @@
warning: [-Wtruncation] warning: Truncating title "0123456789ABCDEF" to 15 chars [-Wtruncation]
Truncating title "0123456789ABCDEF" to 15 chars warning: Overwrote a non-zero byte in the title [-Woverwrite]
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the CGB flag [-Woverwrite]
Overwrote a non-zero byte in the title
warning: [-Woverwrite]
Overwrote a non-zero byte in the CGB flag

View File

@@ -1,6 +1,3 @@
warning: [-Wtruncation] warning: Truncating title "0123456789ABCDEF" to 15 chars [-Wtruncation]
Truncating title "0123456789ABCDEF" to 15 chars warning: Overwrote a non-zero byte in the title [-Woverwrite]
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the CGB flag [-Woverwrite]
Overwrote a non-zero byte in the title
warning: [-Woverwrite]
Overwrote a non-zero byte in the CGB flag

View File

@@ -1,6 +1,3 @@
warning: [-Wtruncation] warning: Truncating title "0123456789ABCDEF" to 11 chars [-Wtruncation]
Truncating title "0123456789ABCDEF" to 11 chars warning: Overwrote a non-zero byte in the title [-Woverwrite]
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the manufacturer code [-Woverwrite]
Overwrote a non-zero byte in the title
warning: [-Woverwrite]
Overwrote a non-zero byte in the manufacturer code

View File

@@ -1,6 +1,3 @@
warning: [-Wtruncation] warning: Truncating title "0123456789ABCDEF" to 11 chars [-Wtruncation]
Truncating title "0123456789ABCDEF" to 11 chars warning: Overwrote a non-zero byte in the title [-Woverwrite]
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the manufacturer code [-Woverwrite]
Overwrote a non-zero byte in the title
warning: [-Woverwrite]
Overwrote a non-zero byte in the manufacturer code

View File

@@ -1,2 +1 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the title [-Woverwrite]
Overwrote a non-zero byte in the title

View File

@@ -1,4 +1,2 @@
warning: [-Wtruncation] warning: Truncating title "0123456789ABCDEFGHIJK" to 16 chars [-Wtruncation]
Truncating title "0123456789ABCDEFGHIJK" to 16 chars warning: Overwrote a non-zero byte in the title [-Woverwrite]
warning: [-Woverwrite]
Overwrote a non-zero byte in the title

View File

@@ -1,2 +1 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the title [-Woverwrite]
Overwrote a non-zero byte in the title

View File

@@ -1,10 +1,5 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the cartridge type [-Woverwrite]
Overwrote a non-zero byte in the cartridge type warning: Overwrote a non-zero byte in the TPP1 identification code [-Woverwrite]
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the TPP1 revision number [-Woverwrite]
Overwrote a non-zero byte in the TPP1 identification code warning: Overwrote a non-zero byte in the RAM size [-Woverwrite]
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the TPP1 feature flags [-Woverwrite]
Overwrote a non-zero byte in the TPP1 revision number
warning: [-Woverwrite]
Overwrote a non-zero byte in the RAM size
warning: [-Woverwrite]
Overwrote a non-zero byte in the TPP1 feature flags

View File

@@ -1,10 +1,5 @@
warning: [-Wmbc] warning: TPP1 overwrites region flag for its identification code, ignoring `-j` [-Wmbc]
TPP1 overwrites region flag for its identification code, ignoring `-j` warning: Overwrote a non-zero byte in the cartridge type [-Woverwrite]
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the TPP1 identification code [-Woverwrite]
Overwrote a non-zero byte in the cartridge type warning: Overwrote a non-zero byte in the TPP1 revision number [-Woverwrite]
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the TPP1 feature flags [-Woverwrite]
Overwrote a non-zero byte in the TPP1 identification code
warning: [-Woverwrite]
Overwrote a non-zero byte in the TPP1 revision number
warning: [-Woverwrite]
Overwrote a non-zero byte in the TPP1 feature flags

View File

@@ -1,6 +1,3 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the Nintendo logo [-Woverwrite]
Overwrote a non-zero byte in the Nintendo logo warning: Overwrote a non-zero byte in the header checksum [-Woverwrite]
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the global checksum [-Woverwrite]
Overwrote a non-zero byte in the header checksum
warning: [-Woverwrite]
Overwrote a non-zero byte in the global checksum

View File

@@ -1,6 +1,3 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the Nintendo logo [-Woverwrite]
Overwrote a non-zero byte in the Nintendo logo warning: Overwrote a non-zero byte in the header checksum [-Woverwrite]
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the global checksum [-Woverwrite]
Overwrote a non-zero byte in the header checksum
warning: [-Woverwrite]
Overwrote a non-zero byte in the global checksum

View File

@@ -1,6 +1,3 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the Nintendo logo [-Woverwrite]
Overwrote a non-zero byte in the Nintendo logo warning: Overwrote a non-zero byte in the header checksum [-Woverwrite]
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the global checksum [-Woverwrite]
Overwrote a non-zero byte in the header checksum
warning: [-Woverwrite]
Overwrote a non-zero byte in the global checksum

View File

@@ -1,2 +1 @@
warning: [-Woverwrite] warning: Overwrote a non-zero byte in the mask ROM version number [-Woverwrite]
Overwrote a non-zero byte in the mask ROM version number

View File

@@ -1,3 +1,2 @@
error: [-Werror=embedded] error: Sorting palette colors by PNG's embedded PLTE chunk without '-c/--colors embedded' [-Werror=embedded]
Sorting palette colors by PNG's embedded PLTE chunk without '-c/--colors embedded'
Conversion aborted after 1 error Conversion aborted after 1 error

View File

@@ -1,2 +1 @@
warning: [-Wtrim-nonempty] warning: Trimming a nonempty tile (configure with '-x/--trim-end') [-Wtrim-nonempty]
Trimming a nonempty tile (configure with '-x/--trim-end')