[Ocfs2-tools-devel] [PATCH] libocfs2: Clean up warnings from the inline data changes.
Joel Becker
Joel.Becker at oracle.com
Fri Aug 8 19:04:44 PDT 2008
Just a few compiler warnings from the inline data commits.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
---
libocfs2/alloc.c | 1 -
libocfs2/dir_iterate.c | 2 --
libocfs2/expanddir.c | 2 +-
libocfs2/fileio.c | 5 +++--
4 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/libocfs2/alloc.c b/libocfs2/alloc.c
index 3cc882d..03b3091 100644
--- a/libocfs2/alloc.c
+++ b/libocfs2/alloc.c
@@ -152,7 +152,6 @@ static void ocfs2_init_inode(ocfs2_filesys *fs, struct ocfs2_dinode *di,
uint64_t blkno, uint16_t mode,
uint32_t flags)
{
- struct ocfs2_extent_list *fel;
int cs_bits = OCFS2_RAW_SB(fs->fs_super)->s_clustersize_bits;
unsigned int tl_recs;
diff --git a/libocfs2/dir_iterate.c b/libocfs2/dir_iterate.c
index 29281ea..31ed6e2 100644
--- a/libocfs2/dir_iterate.c
+++ b/libocfs2/dir_iterate.c
@@ -230,7 +230,6 @@ static int ocfs2_inline_dir_iterate(ocfs2_filesys *fs,
struct dir_context *ctx)
{
unsigned int offset = offsetof(struct ocfs2_dinode, id2.i_data.id_data);
- unsigned int next_real_entry = 0;
int ret = 0, changed = 0, do_abort = 0, entry;
entry = OCFS2_DIRENT_DOT_FILE;
@@ -261,7 +260,6 @@ int ocfs2_process_dir_block(ocfs2_filesys *fs,
{
struct dir_context *ctx = (struct dir_context *) priv_data;
unsigned int offset = 0;
- unsigned int next_real_entry = 0;
int ret = 0;
int changed = 0;
int do_abort = 0;
diff --git a/libocfs2/expanddir.c b/libocfs2/expanddir.c
index dda27b3..d886881 100644
--- a/libocfs2/expanddir.c
+++ b/libocfs2/expanddir.c
@@ -182,7 +182,7 @@ errcode_t ocfs2_init_dir(ocfs2_filesys *fs,
return OCFS2_ET_DIR_CORRUPTED;
inline_data = &cinode->ci_inode->id2.i_data;
- data = inline_data->id_data;
+ data = (char *)inline_data->id_data;
size = inline_data->id_count;
} else {
if (cinode->ci_inode->i_dyn_features & OCFS2_INLINE_DATA_FL)
diff --git a/libocfs2/fileio.c b/libocfs2/fileio.c
index 2fb705d..cc554f8 100644
--- a/libocfs2/fileio.c
+++ b/libocfs2/fileio.c
@@ -126,7 +126,8 @@ errcode_t ocfs2_read_whole_file(ocfs2_filesys *fs,
goto out_free;
if (di->i_dyn_features & OCFS2_INLINE_DATA_FL)
- return ocfs2_inline_data_read(di, *buf, di->i_size, 0, len);
+ return ocfs2_inline_data_read(di, *buf, di->i_size, 0,
+ (uint32_t *)len);
ctx.buf = *buf;
ctx.ptr = *buf;
@@ -548,7 +549,7 @@ static errcode_t ocfs2_try_to_write_inline_data(ocfs2_cached_inode *ci,
void *buf, uint32_t count,
uint64_t offset)
{
- int ret, written = 0;
+ int ret;
uint64_t end = offset + count;
ocfs2_filesys *fs = ci->ci_fs;
struct ocfs2_dinode *di = ci->ci_inode;
--
1.5.6.3
--
"Hell is oneself, hell is alone, the other figures in it, merely projections."
- T. S. Eliot
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
More information about the Ocfs2-tools-devel
mailing list