Fix various warning reported by gcc

This commit is contained in:
Christophe Grenier 2013-05-25 13:09:02 +02:00
parent cf15e5dcd2
commit b7a3d0755f
8 changed files with 16 additions and 14 deletions

View file

@ -167,7 +167,7 @@ static int exfat_dir(disk_t *disk, const partition_t *partition, dir_data_t *dir
unsigned int cluster;
unsigned char *buffer_dir=(unsigned char *)MALLOC(NBR_CLUSTER_MAX << cluster_shift);
unsigned int nbr_cluster;
unsigned int clus_blocknr;
// unsigned int clus_blocknr;
unsigned int total_clusters;
exfat_method_t exfat_meth=exFAT_FOLLOW_CLUSTER;
int stop=0;
@ -176,7 +176,7 @@ static int exfat_dir(disk_t *disk, const partition_t *partition, dir_data_t *dir
else
cluster=first_cluster;
memset(buffer_dir, 0, NBR_CLUSTER_MAX<<cluster_shift);
clus_blocknr=le32(exfat_header->clus_blocknr);
// clus_blocknr=le32(exfat_header->clus_blocknr);
total_clusters=le32(exfat_header->total_clusters);
nbr_cluster=0;
while(!is_EOC(cluster) && cluster>=2 && nbr_cluster<NBR_CLUSTER_MAX && stop==0)

View file

@ -53,11 +53,14 @@ unsigned int ext2_remove_used_space(disk_t *disk, const partition_t *partition,
dir_data_t dir_data;
switch(dir_partition_ext2_init(disk, partition, &dir_data, 0))
{
case -2:
case -1:
case DIR_PART_ENOSYS:
return 0;
case DIR_PART_EIO:
log_partition(disk, partition);
log_error("Can't open filesystem. Filesystem seems damaged.\n");
return 0;
case DIR_PART_OK:
break;
}
{
const unsigned int sizeof_buffer=512;

View file

@ -660,12 +660,12 @@ static void OLE_parse_summary_aux(const unsigned char *dataPt, const unsigned in
return ;
pos=get32u(dataPt, 44);
{
unsigned int size;
// unsigned int size;
unsigned int numEntries;
unsigned int i;
if(pos+8 > dirLen)
return ;
size=get32u(dataPt, pos);
// size=get32u(dataPt, pos);
numEntries=get32u(dataPt, pos+4);
#ifdef DEBUG_OLE
log_info("Property Info %u - %u at 0x%x\n", numEntries, size, pos);

View file

@ -133,7 +133,7 @@ static int header_check_lzh(const unsigned char *buffer, const unsigned int buff
/* Level 2 */
case 2:
{
const struct lzh_level2 *hdr=(const struct lzh_level2 *)buffer;
// const struct lzh_level2 *hdr=(const struct lzh_level2 *)buffer;
reset_file_recovery(file_recovery_new);
file_recovery_new->extension=file_hint_lzh.extension;
return 1;

View file

@ -1117,7 +1117,7 @@ static void file_clean(disk_t *disk)
}
#endif
close(data->handle);
data->handle=NULL;
data->handle=0;
}
generic_clean(disk);
}

View file

@ -56,7 +56,7 @@ struct info_io_redir
};
static int io_redir_pread(disk_t *disk_car, void *buffer, const unsigned int count, const uint64_t offset);
static int io_redir_clean(disk_t *clean);
static void io_redir_clean(disk_t *clean);
int io_redir_add_redir(disk_t *disk_car, const uint64_t org_offset, const unsigned int size, const uint64_t new_offset, const void *mem)
{
@ -217,7 +217,7 @@ static int io_redir_pread(disk_t *disk_car, void *buffer, const unsigned int cou
return count;
}
static int io_redir_clean(disk_t *disk_car)
static void io_redir_clean(disk_t *disk_car)
{
if(disk_car->data)
{
@ -227,6 +227,5 @@ static int io_redir_clean(disk_t *disk_car)
free(disk_car->data);
disk_car->data=NULL;
}
return 0;
}

View file

@ -45,7 +45,7 @@ void log_partition(const disk_t *disk, const partition_t *partition)
void log_all_partitions(const disk_t *disk, const list_part_t *list_part)
{
list_part_t *element;
const list_part_t *element;
for(element=list_part; element!=NULL; element=element->next)
log_partition(disk, element->part);
}

View file

@ -61,7 +61,7 @@ int session_load(char **cmd_device, char **current_cmd, alloc_data_t *list_free_
int taille;
struct stat stat_rec;
unsigned int buffer_size;
time_t my_time;
// time_t my_time;
char *info=NULL;
f_session=fopen(SESSION_FILENAME,"rb");
if(!f_session)
@ -86,7 +86,7 @@ int session_load(char **cmd_device, char **current_cmd, alloc_data_t *list_free_
}
pos++;
/* load time */
my_time=strtol(pos,&pos,10);
strtol(pos,&pos,10); // my_time=strtol(pos,&pos,10);
if(pos==NULL)
{
free(buffer);