Not all error conditions print a message

This commit is contained in:
Allen Hill
2026-07-21 12:52:25 -07:00
parent 5bbbb6c011
commit 909915730b
+3 -3
View File
@@ -299,16 +299,16 @@ auto Bus::read(uint16_t address, Frame::Print print)
goto VERBOSE; goto VERBOSE;
case BAD_CONTROL_PARITY: fputs("reading control", stdout); goto VERBOSE; case BAD_CONTROL_PARITY: fputs("reading control", stdout); goto VERBOSE;
case BAD_LENGTH_PARITY: fputs("reading length", stdout); goto VERBOSE; case BAD_LENGTH_PARITY: fputs("reading length", stdout); goto VERBOSE;
case BAD_LENGTH_RANGE: printf("bad length 0x%02X", err.val); break; case BAD_LENGTH_RANGE: printf("bad length 0x%02X:", err.val); break;
case BAD_DATA_PARITY: fputs("reading data", stdout); goto VERBOSE; case BAD_DATA_PARITY: fputs("reading data", stdout); goto VERBOSE;
case BAD_PARITY: case BAD_PARITY:
__builtin_unreachable(); __builtin_unreachable();
VERBOSE: VERBOSE:
if (print.verbose) { if (print.verbose) {
printf("; read 0x%02X", err.val); printf("; read 0x%02X:", err.val);
} }
} }
puts(":"); putchar('\n');
} }
// Only print if some data has been correctly received // Only print if some data has been correctly received