Avoid unnecessary "overwriting a non-zero byte" warnings

- Don't warn if the non-zero byte being written is the same as the original byte
- Add a `-O` / `--overwrite` flag to silence all such warnings

Fixes #897
This commit is contained in:
Rangi
2021-06-20 16:59:36 -04:00
committed by Eldred Habert
parent 6d2db2ef64
commit 06b57aa1ce
13 changed files with 116 additions and 87 deletions

View File

@@ -0,0 +1 @@
warning: Overwrote a non-zero byte in the global checksum

View File

@@ -0,0 +1 @@
warning: Overwrote a non-zero byte in the global checksum

View File

@@ -0,0 +1 @@
warning: Overwrote a non-zero byte in the global checksum

View File

@@ -0,0 +1 @@
warning: Overwrote a non-zero byte in the global checksum

BIN
test/fix/overwrite.bin Normal file

Binary file not shown.

0
test/fix/overwrite.err Normal file
View File

2
test/fix/overwrite.flags Normal file
View File

@@ -0,0 +1,2 @@
-O -Cjv -t PM_CRYSTAL -i BYTE -n 0 -k 01 -l 0x33 -m 0x10 -r 3 -p 0
Checks that the -O flag suppresses "Overwrote a non-zero byte" warnings from the rest

View File

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

View File

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

View File

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