summaryrefslogtreecommitdiff
path: root/e2fsck/pass2.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2008-11-16 10:03:00 -0500
committerTheodore Ts'o <tytso@mit.edu>2008-11-16 10:06:59 -0500
commit03fa6f8ae28a87018325c892f731097cc97d9eac (patch)
tree0b0f71639b35565fecbd40189c3dfec4fbb52f54 /e2fsck/pass2.c
parentdd20e25f062fbf39da2163f20adb676d0c487b8d (diff)
downloade2fsprogs-03fa6f8ae28a87018325c892f731097cc97d9eac.tar.gz
Fix various signed/unsigned gcc warnings
Some of these could affect filesystems between 2^31 and 2^32-1 blocks. Thanks to Valerie Aurora Henson for pointing out the problems in lib/ext2fs/alloc_tables.c, which led me to do a "make gcc-wall" scan over the source tree. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'e2fsck/pass2.c')
-rw-r--r--e2fsck/pass2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/e2fsck/pass2.c b/e2fsck/pass2.c
index c36bfcf4..f479df66 100644
--- a/e2fsck/pass2.c
+++ b/e2fsck/pass2.c
@@ -717,7 +717,7 @@ static int check_dir_block(ext2_filsys fs,
const char * old_op;
int dir_modified = 0;
int dot_state;
- int rec_len;
+ unsigned int rec_len;
blk_t block_nr = db->blk;
ext2_ino_t ino = db->ino;
ext2_ino_t subdir_parent;
@@ -855,7 +855,7 @@ out_htree:
if (((offset + rec_len) > fs->blocksize) ||
(rec_len < 12) ||
((rec_len % 4) != 0) ||
- (((dirent->name_len & 0xFF)+8) > rec_len)) {
+ (((dirent->name_len & (unsigned) 0xFF)+8) > rec_len)) {
if (fix_problem(ctx, PR_2_DIR_CORRUPTED, &cd->pctx)) {
salvage_directory(fs, dirent, prev, &offset);
dir_modified++;