Commit bf6b6af74655506ce23ca04d6e5c6b3ad3fcf490
1 parent
079df7223c
Exists in
master
and in
54 other branches
fs/fat/fat_write.c: Fix GCC 4.6 warnings
Fix: fat_write.c: In function 'find_directory_entry': fat_write.c:826:8: warning: variable 'prevcksum' set but not used [-Wunused-but-set-variable] fat_write.c: In function 'do_fat_write': fat_write.c:933:6: warning: variable 'root_cluster' set but not used [-Wunused-but-set-variable] fat_write.c:925:12: warning: variable 'slotptr' set but not used [-Wunused-but-set-variable] Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Donggeun Kim <dg77.kim@samsung.com> Acked-by: Maximilian Schwerin <mvs@tigris.de> Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Showing 1 changed file with 1 additions and 9 deletions Side-by-side Diff
fs/fat/fat_write.c
... | ... | @@ -823,7 +823,6 @@ |
823 | 823 | static dir_entry *find_directory_entry(fsdata *mydata, int startsect, |
824 | 824 | char *filename, dir_entry *retdent, __u32 start) |
825 | 825 | { |
826 | - __u16 prevcksum = 0xffff; | |
827 | 826 | __u32 curclust = (startsect - mydata->data_begin) / mydata->clust_size; |
828 | 827 | |
829 | 828 | debug("get_dentfromdir: %s\n", filename); |
... | ... | @@ -857,8 +856,6 @@ |
857 | 856 | #ifdef CONFIG_SUPPORT_VFAT |
858 | 857 | if ((dentptr->attr & ATTR_VFAT) && |
859 | 858 | (dentptr->name[0] & LAST_LONG_ENTRY_MASK)) { |
860 | - prevcksum = | |
861 | - ((dir_slot *)dentptr)->alias_checksum; | |
862 | 859 | get_long_file_name(mydata, curclust, |
863 | 860 | get_dentfromdir_block, |
864 | 861 | &dentptr, l_name); |
... | ... | @@ -922,7 +919,6 @@ |
922 | 919 | unsigned long size) |
923 | 920 | { |
924 | 921 | dir_entry *dentptr, *retdent; |
925 | - dir_slot *slotptr; | |
926 | 922 | __u32 startsect; |
927 | 923 | __u32 start_cluster; |
928 | 924 | boot_sector bs; |
... | ... | @@ -930,7 +926,7 @@ |
930 | 926 | fsdata datablock; |
931 | 927 | fsdata *mydata = &datablock; |
932 | 928 | int cursect; |
933 | - int root_cluster, ret = -1, name_len; | |
929 | + int ret = -1, name_len; | |
934 | 930 | char l_filename[VFAT_MAXLEN_BYTES]; |
935 | 931 | int write_size = size; |
936 | 932 | |
... | ... | @@ -945,8 +941,6 @@ |
945 | 941 | if (total_sector == 0) |
946 | 942 | total_sector = cur_part_info.size; |
947 | 943 | |
948 | - root_cluster = bs.root_cluster; | |
949 | - | |
950 | 944 | if (mydata->fatsize == 32) |
951 | 945 | mydata->fatlength = bs.fat32_length; |
952 | 946 | else |
... | ... | @@ -1047,8 +1041,6 @@ |
1047 | 1041 | goto exit; |
1048 | 1042 | } |
1049 | 1043 | } else { |
1050 | - slotptr = (dir_slot *)empty_dentptr; | |
1051 | - | |
1052 | 1044 | /* Set short name to set alias checksum field in dir_slot */ |
1053 | 1045 | set_name(empty_dentptr, filename); |
1054 | 1046 | fill_dir_slot(mydata, &empty_dentptr, filename); |