Commit 4da3c646 authored by Steven Whitehouse's avatar Steven Whitehouse

[GFS2] Fix a coupls of warnings in dir.c

Fix a couple of compiler warnings in dir.c caused by
potentially uninitialised variables.
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent b2a580d8
...@@ -936,7 +936,7 @@ static int dir_split_leaf(struct inode *inode, const struct qstr *name) ...@@ -936,7 +936,7 @@ static int dir_split_leaf(struct inode *inode, const struct qstr *name)
struct gfs2_inode *dip = GFS2_I(inode); struct gfs2_inode *dip = GFS2_I(inode);
struct buffer_head *nbh, *obh, *dibh; struct buffer_head *nbh, *obh, *dibh;
struct gfs2_leaf *nleaf, *oleaf; struct gfs2_leaf *nleaf, *oleaf;
struct gfs2_dirent *dent, *prev = NULL, *next = NULL, *new; struct gfs2_dirent *dent = NULL, *prev = NULL, *next = NULL, *new;
uint32_t start, len, half_len, divider; uint32_t start, len, half_len, divider;
uint64_t bn, *lp, leaf_no; uint64_t bn, *lp, leaf_no;
uint32_t index; uint32_t index;
...@@ -1356,7 +1356,7 @@ static int dir_e_read(struct inode *inode, uint64_t *offset, void *opaque, ...@@ -1356,7 +1356,7 @@ static int dir_e_read(struct inode *inode, uint64_t *offset, void *opaque,
uint64_t *lp; uint64_t *lp;
int copied = 0; int copied = 0;
int error = 0; int error = 0;
unsigned depth; unsigned depth = 0;
hsize = 1 << dip->i_di.di_depth; hsize = 1 << dip->i_di.di_depth;
if (hsize * sizeof(uint64_t) != dip->i_di.di_size) { if (hsize * sizeof(uint64_t) != dip->i_di.di_size) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment