summaryrefslogtreecommitdiffstats
path: root/fs/udf/misc.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/misc.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/misc.c')
-rw-r--r--fs/udf/misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/udf/misc.c b/fs/udf/misc.c
index 97f3258a7483..401e64cde1be 100644
--- a/fs/udf/misc.c
+++ b/fs/udf/misc.c
@@ -209,7 +209,7 @@ struct buffer_head *udf_read_tagged(struct super_block *sb, uint32_t block,
209 209
210 bh = udf_tread(sb, block); 210 bh = udf_tread(sb, block);
211 if (!bh) { 211 if (!bh) {
212 udf_err(sb, "read failed, block=%u, location=%d\n", 212 udf_err(sb, "read failed, block=%u, location=%u\n",
213 block, location); 213 block, location);
214 return NULL; 214 return NULL;
215 } 215 }
@@ -247,7 +247,7 @@ struct buffer_head *udf_read_tagged(struct super_block *sb, uint32_t block,
247 le16_to_cpu(tag_p->descCRCLength))) 247 le16_to_cpu(tag_p->descCRCLength)))
248 return bh; 248 return bh;
249 249
250 udf_debug("Crc failure block %d: crc = %d, crclen = %d\n", block, 250 udf_debug("Crc failure block %u: crc = %u, crclen = %u\n", block,
251 le16_to_cpu(tag_p->descCRC), 251 le16_to_cpu(tag_p->descCRC),
252 le16_to_cpu(tag_p->descCRCLength)); 252 le16_to_cpu(tag_p->descCRCLength));
253error_out: 253error_out: