diff options
author | Theodore Ts'o <tytso@mit.edu> | 2003-12-07 01:28:50 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2003-12-07 01:28:50 -0500 |
commit | 544349270e4c74a6feb971123884a8cf5052a7ee (patch) | |
tree | 7c3c483148953f1cd5eadc9cf5eb6f7faabc31c5 /lib/ext2fs/mkjournal.c | |
parent | 3de085dd4109e6a7049dd6b85abf0313167cab5b (diff) | |
download | e2fsprogs-544349270e4c74a6feb971123884a8cf5052a7ee.tar.gz |
Fix gcc -Wall nitpicks
Diffstat (limited to 'lib/ext2fs/mkjournal.c')
-rw-r--r-- | lib/ext2fs/mkjournal.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lib/ext2fs/mkjournal.c b/lib/ext2fs/mkjournal.c index abf162e7..427a08e7 100644 --- a/lib/ext2fs/mkjournal.c +++ b/lib/ext2fs/mkjournal.c @@ -94,7 +94,8 @@ static errcode_t write_journal_file(ext2_filsys fs, char *filename, { errcode_t retval; char *buf = 0; - int i, fd, ret_size; + int fd, ret_size; + blk_t i; if ((retval = ext2fs_create_journal_superblock(fs, size, flags, &buf))) return retval; @@ -112,7 +113,7 @@ static errcode_t write_journal_file(ext2_filsys fs, char *filename, retval = errno; goto errout; } - if (ret_size != fs->blocksize) + if (ret_size != (int) fs->blocksize) goto errout; memset(buf, 0, fs->blocksize); @@ -122,7 +123,7 @@ static errcode_t write_journal_file(ext2_filsys fs, char *filename, retval = errno; goto errout; } - if (ret_size != fs->blocksize) + if (ret_size != (int) fs->blocksize) goto errout; } close(fd); @@ -143,12 +144,12 @@ struct mkjournal_struct { errcode_t err; }; -static int mkjournal_proc(ext2_filsys fs, - blk_t *blocknr, - e2_blkcnt_t blockcnt, - blk_t ref_block, - int ref_offset, - void *priv_data) +static int mkjournal_proc(ext2_filsys fs, + blk_t *blocknr, + e2_blkcnt_t blockcnt, + blk_t ref_block EXT2FS_ATTR((unused)), + int ref_offset EXT2FS_ATTR((unused)), + void *priv_data) { struct mkjournal_struct *es = (struct mkjournal_struct *) priv_data; blk_t new_blk; @@ -255,8 +256,8 @@ errcode_t ext2fs_add_journal_device(ext2_filsys fs, ext2_filsys journal_dev) errcode_t retval; char buf[1024]; journal_superblock_t *jsb; - int i, start; - __u32 nr_users; + int start; + __u32 i, nr_users; /* Make sure the device exists and is a block device */ if (stat(journal_dev->device_name, &st) < 0) @@ -277,7 +278,7 @@ errcode_t ext2fs_add_journal_device(ext2_filsys fs, ext2_filsys journal_dev) (jsb->s_header.h_blocktype != (unsigned) ntohl(JFS_SUPERBLOCK_V2))) return EXT2_ET_NO_JOURNAL_SB; - if (ntohl(jsb->s_blocksize) != fs->blocksize) + if (ntohl(jsb->s_blocksize) != (unsigned long) fs->blocksize) return EXT2_ET_UNEXPECTED_BLOCK_SIZE; /* Check and see if this filesystem has already been added */ |