• M
    udf: fix 3 signedness & 1 unitialized variable warnings · 1ed16171
    Marcin Slusarz 提交于
    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: NMarcin Slusarz <marcin.slusarz@gmail.com>
    Cc: Ben Fennema <bfennema@falcon.csc.calpoly.edu>
    Acked-by: NJan Kara <jack@suse.cz>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    1ed16171
udfdecl.h 6.8 KB