summaryrefslogtreecommitdiffstats
path: root/fs/udf/unicode.c
diff options
context:
space:
mode:
authorSteve Magnani <steve.magnani@digidescorp.com>2017-10-12 09:48:41 -0400
committerJan Kara <jack@suse.cz>2017-10-17 06:00:58 -0400
commitfcbf7637e6647e00de04d4b2e05ece2484bb3062 (patch)
tree438535f802620428f7f42c6f44153b5fc5bfe29b /fs/udf/unicode.c
parentb490bdd630cc43a5725e76c7c23f8a7e55551145 (diff)
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>
Diffstat (limited to 'fs/udf/unicode.c')
-rw-r--r--fs/udf/unicode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/udf/unicode.c b/fs/udf/unicode.c
index 695389a4fc23..f897e55f2cd0 100644
--- a/fs/udf/unicode.c
+++ b/fs/udf/unicode.c
@@ -200,7 +200,7 @@ static int udf_name_from_CS0(uint8_t *str_o, int str_max_len,
200 cmp_id = ocu[0]; 200 cmp_id = ocu[0];
201 if (cmp_id != 8 && cmp_id != 16) { 201 if (cmp_id != 8 && cmp_id != 16) {
202 memset(str_o, 0, str_max_len); 202 memset(str_o, 0, str_max_len);
203 pr_err("unknown compression code (%d)\n", cmp_id); 203 pr_err("unknown compression code (%u)\n", cmp_id);
204 return -EINVAL; 204 return -EINVAL;
205 } 205 }
206 u_ch = cmp_id >> 3; 206 u_ch = cmp_id >> 3;