Skip to content

Commit

Permalink
fs/hfsplus/unicode.c: fix uninitialized var warning
Browse files Browse the repository at this point in the history
fs/hfsplus/unicode.c: In function 'hfsplus_hash_dentry':
fs/hfsplus/unicode.c:328: warning: 'dsize' may be used uninitialized in this function

Cc: Roman Zippel <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
akpm00 authored and Linus Torvalds committed Feb 8, 2008
1 parent 800fdfb commit 8aa84ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/hfsplus/unicode.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ int hfsplus_hash_dentry(struct dentry *dentry, struct qstr *str)
struct super_block *sb = dentry->d_sb;
const char *astr;
const u16 *dstr;
int casefold, decompose, size, dsize, len;
int casefold, decompose, size, len;
unsigned long hash;
wchar_t c;
u16 c2;
Expand All @@ -336,6 +336,7 @@ int hfsplus_hash_dentry(struct dentry *dentry, struct qstr *str)
astr = str->name;
len = str->len;
while (len > 0) {
int uninitialized_var(dsize);
size = asc2unichar(sb, astr, len, &c);
astr += size;
len -= size;
Expand Down

0 comments on commit 8aa84ab

Please sign in to comment.