mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-07-01 23:53:16 -04:00
udf: Fix signed/unsigned format specifiers
Fix problems noted in compilion with -Wformat=2 -Wformat-signedness. In particular, a mismatch between the signedness of a value and the signedness of its format specifier can result in unsigned values being printed as negative numbers, e.g.: Partition (0 type 1511) starts at physical 460, block length -1779968542 ...which occurs when mounting a large (> 1 TiB) UDF partition. Changes since V1: * Fixed additional issues noted in udf_bitmap_free_blocks(), udf_get_fileident(), udf_show_options() Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
parent
b490bdd630
commit
fcbf7637e6
8 changed files with 49 additions and 49 deletions
|
@ -200,7 +200,7 @@ static int udf_name_from_CS0(uint8_t *str_o, int str_max_len,
|
|||
cmp_id = ocu[0];
|
||||
if (cmp_id != 8 && cmp_id != 16) {
|
||||
memset(str_o, 0, str_max_len);
|
||||
pr_err("unknown compression code (%d)\n", cmp_id);
|
||||
pr_err("unknown compression code (%u)\n", cmp_id);
|
||||
return -EINVAL;
|
||||
}
|
||||
u_ch = cmp_id >> 3;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue