Fix some -Werror=sign-conversion bugs

This commit is contained in:
Nigel Tao committed 2021-03-09 00:39:26 +11:00
1 parent 69e32e8579
commit 312810f5a3
4 files changed
+21 -7

No files matched your search

+2 -2
View File
@@ -48,7 +48,7 @@ wuffs_base__magic_number_guess_fourcc(wuffs_base__slice_u8 prefix) {
int32_t fourcc = 0;
size_t i;
for (i = 0; i < table_len; i++) {
uint8_t mag_first_byte = table[i].magic[1];
uint8_t mag_first_byte = ((uint8_t)(table[i].magic[1]));
if (pre_first_byte < mag_first_byte) {
break;
} else if (pre_first_byte > mag_first_byte) {
@@ -56,7 +56,7 @@ wuffs_base__magic_number_guess_fourcc(wuffs_base__slice_u8 prefix) {
}
fourcc = table[i].fourcc;
uint8_t mag_remaining_len = table[i].magic[0];
uint8_t mag_remaining_len = ((uint8_t)(table[i].magic[0]));
if (mag_remaining_len == 0) {
goto match;
}