diff options
author | Andreas Dilger <adilger@whamcloud.com> | 2011-06-11 10:58:25 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-06-11 10:58:25 -0400 |
commit | cf5301d7f2c3bbed3d26600335102414cbf0c4ba (patch) | |
tree | 42d6f95894583f1ddb507e5a2332b7b2ab6a13e4 /lib/ext2fs | |
parent | 44fe08f1fa1e9a994ff304aa02022c53c9341519 (diff) | |
download | e2fsprogs-cf5301d7f2c3bbed3d26600335102414cbf0c4ba.tar.gz |
misc: clean up compiler warnings
Fix several types of compiler warnings (unused variables/labels),
uninitialized variables, etc that are hit with gcc -Wall.
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'lib/ext2fs')
-rw-r--r-- | lib/ext2fs/ext2fs.h | 3 | ||||
-rw-r--r-- | lib/ext2fs/fileio.c | 2 | ||||
-rw-r--r-- | lib/ext2fs/openfs.c | 1 | ||||
-rw-r--r-- | lib/ext2fs/progress.c | 2 | ||||
-rw-r--r-- | lib/ext2fs/res_gdt.c | 2 | ||||
-rw-r--r-- | lib/ext2fs/unix_io.c | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h index a0354110..889c7716 100644 --- a/lib/ext2fs/ext2fs.h +++ b/lib/ext2fs/ext2fs.h @@ -1414,7 +1414,8 @@ _INLINE_ errcode_t ext2fs_get_memalign(unsigned long size, if (align == 0) align = 8; - if (retval = posix_memalign((void **) ptr, align, size)) { + retval = posix_memalign((void **) ptr, align, size); + if (retval) { if (retval == ENOMEM) return EXT2_ET_NO_MEMORY; return retval; diff --git a/lib/ext2fs/fileio.c b/lib/ext2fs/fileio.c index 4b62c2d4..d62ef35b 100644 --- a/lib/ext2fs/fileio.c +++ b/lib/ext2fs/fileio.c @@ -377,7 +377,7 @@ errcode_t ext2fs_file_set_size2(ext2_file_t file, ext2_off64_t size) truncate_block = ((size + file->fs->blocksize - 1) >> EXT2_BLOCK_SIZE_BITS(file->fs->super)) + 1; old_size = file->inode.i_size + - ((blk64_t) file->inode.i_size_high) << 32; + ((blk64_t)file->inode.i_size_high << 32); old_truncate = ((old_size + file->fs->blocksize - 1) >> EXT2_BLOCK_SIZE_BITS(file->fs->super)) + 1; diff --git a/lib/ext2fs/openfs.c b/lib/ext2fs/openfs.c index 2ef3f274..283daeec 100644 --- a/lib/ext2fs/openfs.c +++ b/lib/ext2fs/openfs.c @@ -365,7 +365,6 @@ errcode_t ext2fs_open2(const char *name, const char *io_options, */ if (superblock > 1 && EXT2_HAS_RO_COMPAT_FEATURE(fs->super, EXT4_FEATURE_RO_COMPAT_GDT_CSUM)) { - struct ext2_group_desc *gd; dgrp_t group; for (group = 0; group < fs->group_desc_count; group++) { diff --git a/lib/ext2fs/progress.c b/lib/ext2fs/progress.c index ec4f5532..1b9bf9ca 100644 --- a/lib/ext2fs/progress.c +++ b/lib/ext2fs/progress.c @@ -77,8 +77,6 @@ void ext2fs_numeric_progress_close(ext2_filsys fs, struct ext2fs_numeric_progress_struct * progress, const char *message) { - unsigned int len; - if (!(fs->flags & EXT2_FLAG_PRINT_PROGRESS)) return; fprintf(stdout, "%.*s", (2*progress->log_max)+1, spaces); diff --git a/lib/ext2fs/res_gdt.c b/lib/ext2fs/res_gdt.c index bf109959..f3b39692 100644 --- a/lib/ext2fs/res_gdt.c +++ b/lib/ext2fs/res_gdt.c @@ -75,7 +75,7 @@ errcode_t ext2fs_create_resize_inode(ext2_filsys fs) retval = ext2fs_get_array(2, fs->blocksize, &dindir_buf); if (retval) - goto out_free; + return retval; gdt_buf = (__u32 *)((char *)dindir_buf + fs->blocksize); retval = ext2fs_read_inode(fs, EXT2_RESIZE_INO, &inode); diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c index 82e0fe44..6e480b79 100644 --- a/lib/ext2fs/unix_io.c +++ b/lib/ext2fs/unix_io.c @@ -17,7 +17,9 @@ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif #include <stdio.h> #include <string.h> |