aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/inode.c
diff options
context:
space:
mode:
authorMarcin Slusarz <marcin.slusarz@gmail.com>2008-02-08 07:20:48 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:22:36 -0500
commit1ed161718a8f763130e6e349f2bbb1b764e6c5b3 (patch)
tree5bcb9e0c1320f184977345b604449dd7b9bc21f4 /fs/udf/inode.c
parent934c5e6019758305b9cb1eb977c5eac997cd0180 (diff)
udf: fix 3 signedness & 1 unitialized variable warnings
sparse generated: fs/udf/inode.c:324:41: warning: incorrect type in argument 4 (different signedness) fs/udf/inode.c:324:41: expected long *<noident> fs/udf/inode.c:324:41: got unsigned long *<noident> inode_getblk always set 4th argument to uint32_t value 3rd parameter of map_bh is sector_t (which is unsigned long or u64) so convert phys value to sector_t fs/udf/inode.c:1818:47: warning: incorrect type in argument 3 (different signedness) fs/udf/inode.c:1818:47: expected int *<noident> fs/udf/inode.c:1818:47: got unsigned int *<noident> fs/udf/inode.c:1826:46: warning: incorrect type in argument 3 (different signedness) fs/udf/inode.c:1826:46: expected int *<noident> fs/udf/inode.c:1826:46: got unsigned int *<noident> udf_get_filelongad and udf_get_shortad are called always for uint32_t values (struct extent_position->offset), so it's safe to convert offset parameter to uint32_t gcc warned: fs/udf/inode.c: In function 'udf_get_block': fs/udf/inode.c:299: warning: 'phys' may be used uninitialized in this function initialize it to 0 (if someday someone will break inode_getblk we will catch it immediately) Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: Ben Fennema <bfennema@falcon.csc.calpoly.edu> Acked-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/udf/inode.c')
-rw-r--r--fs/udf/inode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 6b4409f5019..466d2eea0ec 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -52,7 +52,7 @@ static int udf_update_inode(struct inode *, int);
52static void udf_fill_inode(struct inode *, struct buffer_head *); 52static void udf_fill_inode(struct inode *, struct buffer_head *);
53static int udf_alloc_i_data(struct inode *inode, size_t size); 53static int udf_alloc_i_data(struct inode *inode, size_t size);
54static struct buffer_head *inode_getblk(struct inode *, sector_t, int *, 54static struct buffer_head *inode_getblk(struct inode *, sector_t, int *,
55 long *, int *); 55 sector_t *, int *);
56static int8_t udf_insert_aext(struct inode *, struct extent_position, 56static int8_t udf_insert_aext(struct inode *, struct extent_position,
57 kernel_lb_addr, uint32_t); 57 kernel_lb_addr, uint32_t);
58static void udf_split_extents(struct inode *, int *, int, int, 58static void udf_split_extents(struct inode *, int *, int, int,
@@ -307,7 +307,7 @@ static int udf_get_block(struct inode *inode, sector_t block,
307{ 307{
308 int err, new; 308 int err, new;
309 struct buffer_head *bh; 309 struct buffer_head *bh;
310 unsigned long phys; 310 sector_t phys = 0;
311 struct udf_inode_info *iinfo; 311 struct udf_inode_info *iinfo;
312 312
313 if (!create) { 313 if (!create) {
@@ -489,7 +489,7 @@ out:
489} 489}
490 490
491static struct buffer_head *inode_getblk(struct inode *inode, sector_t block, 491static struct buffer_head *inode_getblk(struct inode *inode, sector_t block,
492 int *err, long *phys, int *new) 492 int *err, sector_t *phys, int *new)
493{ 493{
494 static sector_t last_block; 494 static sector_t last_block;
495 struct buffer_head *result = NULL; 495 struct buffer_head *result = NULL;