Skip to content
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.

Commit

Permalink
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>
  • Loading branch information
arter97 committed Sep 14, 2019
1 parent 2dc0b2e commit 9252dba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 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 9252dba

Please sign in to comment.