Skip to content

Commit

Permalink
UBIFS: fix compilation warning
Browse files Browse the repository at this point in the history
Fix the following compilation warning:

fs/ubifs/dir.c: In function 'ubifs_rename':
fs/ubifs/dir.c:972:15: warning: 'saved_nlink' may be used uninitialized
in this function

Use the 'uninitialized_var()' macro to get rid of this false-positive.

Artem: massaged the patch a bit.

Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
  • Loading branch information
Alexandre Pereira da Silva authored and Artem Bityutskiy committed Jul 20, 2012
1 parent c672793 commit 782759b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ubifs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ static int ubifs_rename(struct inode *old_dir, struct dentry *old_dentry,
struct ubifs_budget_req ino_req = { .dirtied_ino = 1,
.dirtied_ino_d = ALIGN(old_inode_ui->data_len, 8) };
struct timespec time;
unsigned int saved_nlink;
unsigned int uninitialized_var(saved_nlink);

/*
* Budget request settings: deletion direntry, new direntry, removing
Expand Down

0 comments on commit 782759b

Please sign in to comment.