make[1]: Nothing to be done for `all'.
cmds-check.c: In function ‘del_file_extent_hole’:
cmds-check.c:289:26: warning: ‘prev.start’ may be used uninitialized in this function
cmds-check.c:289:26: warning: ‘prev.len’ may be used uninitialized in this function
cmds-check.c:290:26: warning: ‘next.start’ may be used uninitialized in this function
cmds-check.c:290:26: warning: ‘next.len’ may be used uninitialized in this function
Reported-by: Anand Jain <Anand.Jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
{
struct file_extent_hole *hole;
struct file_extent_hole tmp;
{
struct file_extent_hole *hole;
struct file_extent_hole tmp;
- struct file_extent_hole prev;
- struct file_extent_hole next;
+ u64 prev_start = 0;
+ u64 prev_len = 0;
+ u64 next_start = 0;
+ u64 next_len = 0;
struct rb_node *node;
int have_prev = 0;
int have_next = 0;
struct rb_node *node;
int have_prev = 0;
int have_next = 0;
* split(s) if they exists.
*/
if (start > hole->start) {
* split(s) if they exists.
*/
if (start > hole->start) {
- prev.start = hole->start;
- prev.len = start - hole->start;
+ prev_start = hole->start;
+ prev_len = start - hole->start;
have_prev = 1;
}
if (hole->start + hole->len > start + len) {
have_prev = 1;
}
if (hole->start + hole->len > start + len) {
- next.start = start + len;
- next.len = hole->start + hole->len - start - len;
+ next_start = start + len;
+ next_len = hole->start + hole->len - start - len;
have_next = 1;
}
rb_erase(node, holes);
free(hole);
if (have_prev) {
have_next = 1;
}
rb_erase(node, holes);
free(hole);
if (have_prev) {
- ret = add_file_extent_hole(holes, prev.start, prev.len);
+ ret = add_file_extent_hole(holes, prev_start, prev_len);
if (ret < 0)
return ret;
}
if (have_next) {
if (ret < 0)
return ret;
}
if (have_next) {
- ret = add_file_extent_hole(holes, next.start, next.len);
+ ret = add_file_extent_hole(holes, next_start, next_len);
if (ret < 0)
return ret;
}
if (ret < 0)
return ret;
}