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>utp
parent
079df7223c
commit
bf6b6af746
|
@ -823,7 +823,6 @@ static dir_entry *empty_dentptr;
|
||||||
static dir_entry *find_directory_entry(fsdata *mydata, int startsect,
|
static dir_entry *find_directory_entry(fsdata *mydata, int startsect,
|
||||||
char *filename, dir_entry *retdent, __u32 start)
|
char *filename, dir_entry *retdent, __u32 start)
|
||||||
{
|
{
|
||||||
__u16 prevcksum = 0xffff;
|
|
||||||
__u32 curclust = (startsect - mydata->data_begin) / mydata->clust_size;
|
__u32 curclust = (startsect - mydata->data_begin) / mydata->clust_size;
|
||||||
|
|
||||||
debug("get_dentfromdir: %s\n", filename);
|
debug("get_dentfromdir: %s\n", filename);
|
||||||
|
@ -857,8 +856,6 @@ static dir_entry *find_directory_entry(fsdata *mydata, int startsect,
|
||||||
#ifdef CONFIG_SUPPORT_VFAT
|
#ifdef CONFIG_SUPPORT_VFAT
|
||||||
if ((dentptr->attr & ATTR_VFAT) &&
|
if ((dentptr->attr & ATTR_VFAT) &&
|
||||||
(dentptr->name[0] & LAST_LONG_ENTRY_MASK)) {
|
(dentptr->name[0] & LAST_LONG_ENTRY_MASK)) {
|
||||||
prevcksum =
|
|
||||||
((dir_slot *)dentptr)->alias_checksum;
|
|
||||||
get_long_file_name(mydata, curclust,
|
get_long_file_name(mydata, curclust,
|
||||||
get_dentfromdir_block,
|
get_dentfromdir_block,
|
||||||
&dentptr, l_name);
|
&dentptr, l_name);
|
||||||
|
@ -922,7 +919,6 @@ static int do_fat_write(const char *filename, void *buffer,
|
||||||
unsigned long size)
|
unsigned long size)
|
||||||
{
|
{
|
||||||
dir_entry *dentptr, *retdent;
|
dir_entry *dentptr, *retdent;
|
||||||
dir_slot *slotptr;
|
|
||||||
__u32 startsect;
|
__u32 startsect;
|
||||||
__u32 start_cluster;
|
__u32 start_cluster;
|
||||||
boot_sector bs;
|
boot_sector bs;
|
||||||
|
@ -930,7 +926,7 @@ static int do_fat_write(const char *filename, void *buffer,
|
||||||
fsdata datablock;
|
fsdata datablock;
|
||||||
fsdata *mydata = &datablock;
|
fsdata *mydata = &datablock;
|
||||||
int cursect;
|
int cursect;
|
||||||
int root_cluster, ret = -1, name_len;
|
int ret = -1, name_len;
|
||||||
char l_filename[VFAT_MAXLEN_BYTES];
|
char l_filename[VFAT_MAXLEN_BYTES];
|
||||||
int write_size = size;
|
int write_size = size;
|
||||||
|
|
||||||
|
@ -945,8 +941,6 @@ static int do_fat_write(const char *filename, void *buffer,
|
||||||
if (total_sector == 0)
|
if (total_sector == 0)
|
||||||
total_sector = cur_part_info.size;
|
total_sector = cur_part_info.size;
|
||||||
|
|
||||||
root_cluster = bs.root_cluster;
|
|
||||||
|
|
||||||
if (mydata->fatsize == 32)
|
if (mydata->fatsize == 32)
|
||||||
mydata->fatlength = bs.fat32_length;
|
mydata->fatlength = bs.fat32_length;
|
||||||
else
|
else
|
||||||
|
@ -1047,8 +1041,6 @@ static int do_fat_write(const char *filename, void *buffer,
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
slotptr = (dir_slot *)empty_dentptr;
|
|
||||||
|
|
||||||
/* Set short name to set alias checksum field in dir_slot */
|
/* Set short name to set alias checksum field in dir_slot */
|
||||||
set_name(empty_dentptr, filename);
|
set_name(empty_dentptr, filename);
|
||||||
fill_dir_slot(mydata, &empty_dentptr, filename);
|
fill_dir_slot(mydata, &empty_dentptr, filename);
|
||||||
|
|
Loading…
Reference in New Issue