Skip to content

Commit

Permalink
fs: exfat: initialize name_len
Browse files Browse the repository at this point in the history
This compilation warning was observed using GCC 9:

  CC [M]  /home/arter97/linux-exfat/core_exfat.o
/home/arter97/linux-exfat/core_exfat.c: In function ‘exfat_find_dir_entry’:
/home/arter97/linux-exfat/core_exfat.c:737:19: warning: ‘name_len’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  737 |  s32 order, step, name_len;
      |                   ^~~~~~~~

Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Signed-off-by: Khusika Dhamar Gusti <mail@khusika.com>
Change-Id: I312af258a6db4548a2d459f1c8ea5fa01bc0d66d
  • Loading branch information
arter97 authored and Khusika Dhamar Gusti committed Oct 9, 2019
1 parent fd91af6 commit 8c4083c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/exfat/core_exfat.c
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ static s32 exfat_find_dir_entry(struct super_block *sb, FILE_ID_T *fid,
CHAIN_T *p_dir, UNI_NAME_T *p_uniname, s32 num_entries, DOS_NAME_T *unused, u32 type)
{
s32 i, rewind = 0, dentry = 0, end_eidx = 0, num_ext = 0, len;
s32 order, step, name_len;
s32 order, step, name_len = 0;
s32 dentries_per_clu, num_empty = 0;
u32 entry_type;
u16 entry_uniname[16], *uniname = NULL, unichar;
Expand Down

0 comments on commit 8c4083c

Please sign in to comment.