Fix sign/unsigness problem

This commit is contained in:
Christophe Grenier 2009-03-22 14:55:20 +01:00
parent c64fe5f996
commit 5ce142dbab
4 changed files with 14 additions and 12 deletions

View file

@ -441,7 +441,8 @@ static unsigned int fat32_find_root_cluster(disk_t *disk_car,const partition_t *
/* Il faut ajouter un parcours arriere de la FAT
* car on localise le dernier cluster du root_cluster */
if(verbose>0)
log_verbose("cluster %lu, etat=%d, found=%d,nb_subdir=%d,nb_subdir_ok=%d\n",root_cluster,etat,found,nb_subdir,nb_subdir_ok);
log_verbose("cluster %lu, etat=%d, found=%u,nb_subdir=%d,nb_subdir_ok=%d\n",
root_cluster, etat, found, nb_subdir, nb_subdir_ok);
do
{
new_root_cluster=tmp;
@ -484,8 +485,8 @@ static unsigned int fat32_find_root_cluster(disk_t *disk_car,const partition_t *
{
if(verbose>1)
{
log_verbose("cluster %lu, etat=%d, found=%d,nb_subdir=%d,nb_subdir_ok=%d\n",
root_cluster,etat,found,nb_subdir,nb_subdir_ok);
log_verbose("cluster %lu, etat=%d, found=%u, nb_subdir=%d, nb_subdir_ok=%d\n",
root_cluster, etat, found, nb_subdir, nb_subdir_ok);
}
}
{
@ -703,7 +704,8 @@ static int find_dir_entries(disk_t *disk_car,const partition_t *partition, const
{
if(verbose>1)
{
log_verbose("find_dir_entries sector=%u entry=%d dir_entry_found=%d\n",offset-i,j,dir_entry_found);
log_verbose("find_dir_entries sector=%u entry=%u dir_entry_found=%d\n",
offset-i, j, dir_entry_found);
}
if(dir_entry_found==0)
{ /* Should be between the last directory entries and the first cluster */
@ -765,7 +767,7 @@ static int analyse_dir_entries(disk_t *disk_car,const partition_t *partition, co
etat=1;
sector_etat1=i;
if(verbose>0)
log_verbose("dir_entries 0->1 %d\n",i*(disk_car->sector_size/32)+j);
log_verbose("dir_entries 0->1 %u\n", i*(disk_car->sector_size/32)+j);
}
}
else
@ -779,7 +781,7 @@ static int analyse_dir_entries(disk_t *disk_car,const partition_t *partition, co
}
/* Data found */
if(verbose>0)
log_verbose("dir_entries 1->2 %d\n",i*(disk_car->sector_size/32)+j);
log_verbose("dir_entries 1->2 %u\n", i*(disk_car->sector_size/32)+j);
return i*(disk_car->sector_size/32);
}
}
@ -1791,7 +1793,7 @@ static upart_type_t select_fat_info(const info_offset_t *info_offset, const unsi
for(i=0;i<nbr_offset;i++)
{
if(nbr_offset<30 || info_offset[i].nbr>1)
screen_buffer_add(" %02d %8lu %u\n",info_offset[i].fat_type,info_offset[i].offset,info_offset[i].nbr);
screen_buffer_add(" %02u %8lu %u\n", info_offset[i].fat_type, info_offset[i].offset, info_offset[i].nbr);
}
aff_copy(stdscr);
wmove(stdscr,4,0);
@ -1917,8 +1919,8 @@ int rebuild_FAT_BS(disk_t *disk_car, partition_t *partition, const int verbose,
fat_length_max=fat_length_max/disk_car->sector_size*disk_car->sector_size;
if(verbose>1)
{
log_verbose("sectors_per_cluster_min %u sectors\n",sectors_per_cluster_min/disk_car->sector_size);
log_verbose("fat_length_max %ld sectors\n", fat_length_max/disk_car->sector_size);
log_verbose("sectors_per_cluster_min %u sectors\n", sectors_per_cluster_min/disk_car->sector_size);
log_verbose("fat_length_max %lu sectors\n", fat_length_max/disk_car->sector_size);
}
max_offset=fat_length_max+64*disk_car->sector_size;
}

View file

@ -198,7 +198,7 @@ static int header_check_lnk(const unsigned char *buffer, const unsigned int buff
log_debug("LNK extra stuff at 0x%04x=%04x\n", i, len);
i+=4;
i+=len;
log_debug("LNK size %d (0x%04x)\n", i, i);
log_debug("LNK size %u (0x%04x)\n", i, i);
reset_file_recovery(file_recovery_new);
file_recovery_new->extension=file_hint_lnk.extension;
file_recovery_new->calculated_file_size=i;

View file

@ -80,7 +80,7 @@ enum {
SG_CDB2_TDIR_TO_DEV = 0 << 3,
SG_CDB2_TDIR_FROM_DEV = 1 << 3,
SG_CDB2_CHECK_COND = 1 << 5,
SG_CDB2_CHECK_COND = 1 << 5
};
#ifndef WIN_READ_NATIVE_MAX

View file

@ -76,7 +76,7 @@ ATTR_RECORD * find_attribute(const ATTR_TYPES type, ntfs_attr_search_ctx *ctx)
return NULL;
}
if (ntfs_attr_lookup(type, NULL, 0, 0, 0, NULL, 0, ctx) != 0) {
if (ntfs_attr_lookup(type, NULL, 0, CASE_SENSITIVE, 0, NULL, 0, ctx) != 0) {
#ifdef DEBUG_NTFS
log_debug("find_attribute didn't find an attribute of type: 0x%02x.\n", type);
#endif