Many files:
rw_bitmaps.c: Fixed signed/unsigned warnings.
fileio.c (ext2fs_file_set_size): Remove unneeded extern from the
function declaration.
dblist.c (make_dblist): Add safety check in case the dblist pointer
passed in is null (in which case, assign it to fs->dblist). Fixed
some signed/unsigned warnings.
bmap.c: Make addr_per_block be of type blk_t to avoid signed/unsigned
warnings.
namei.c (ext2fs_follow_link): Remove uneeded extern from the function
declaration.
get_pathname.c (get_pathname_proc): Use return value from
ext2fs_get_mem, instead of checking if &gp->name is NULL.
dir_iterate.c (ext2fs_process_dir_block):
dblist_dir.c (ext2fs_dblist_dir_iterate): Remove uneeded extern from
the function declaration.
block.c (ext2fs_block_iterate2): If the read_inode call fails, return
the error directly instead of jumping to the cleanup routine, since we
don't need to do any cleanup.
alloc_table.c (ext2fs_allocate_group_table): Make this function take a
dgrp_t for its group argument.
ext2fs.h: Make dgrp_t an __u32 type, and make fs->desc_group_count be
of type dgrp_t.
diff --git a/lib/ext2fs/bmap.c b/lib/ext2fs/bmap.c
index e4cf92a..ba3a114 100644
--- a/lib/ext2fs/bmap.c
+++ b/lib/ext2fs/bmap.c
@@ -91,9 +91,9 @@
{
blk_t b;
errcode_t retval;
- int addr_per_block;
+ blk_t addr_per_block;
- addr_per_block = fs->blocksize >> 2;
+ addr_per_block = (blk_t) fs->blocksize >> 2;
retval = block_ind_bmap(fs, flags, dind, block_buf, blocks_alloc,
nr / addr_per_block, &b);
@@ -111,9 +111,9 @@
{
blk_t b;
errcode_t retval;
- int addr_per_block;
+ blk_t addr_per_block;
- addr_per_block = fs->blocksize >> 2;
+ addr_per_block = (blk_t) fs->blocksize >> 2;
retval = block_dind_bmap(fs, flags, tind, block_buf, blocks_alloc,
nr / addr_per_block, &b);
@@ -129,7 +129,7 @@
blk_t *phys_blk)
{
struct ext2_inode inode_buf;
- int addr_per_block;
+ blk_t addr_per_block;
blk_t b;
char *buf = 0;
errcode_t retval = 0;
@@ -144,7 +144,7 @@
return retval;
inode = &inode_buf;
}
- addr_per_block = fs->blocksize >> 2;
+ addr_per_block = (blk_t) fs->blocksize >> 2;
if (!block_buf) {
retval = ext2fs_get_mem(fs->blocksize * 2, (void **) &buf);