summaryrefslogtreecommitdiffstats
path: root/src/fat_dir.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2009-02-03 09:29:29 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2009-02-03 09:29:29 +0100
commit203df0e3a588f01ebfb60428eb1a5ab258a4969d (patch)
tree022c7facc406d0eea910638c7b41355964ee8549 /src/fat_dir.c
parentc6e94c6adfe071f4510190069638d70d59675f42 (diff)
Fix some compilation warnings
Diffstat (limited to 'src/fat_dir.c')
-rw-r--r--src/fat_dir.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/fat_dir.c b/src/fat_dir.c
index 06ae3ac..b0f3ad9 100644
--- a/src/fat_dir.c
+++ b/src/fat_dir.c
@@ -41,8 +41,6 @@
#include "common.h"
#include "fat.h"
#include "lang.h"
-#include "fnctdsk.h"
-#include "testdisk.h"
#include "intrf.h"
#include "dir.h"
#include "fat_dir.h"
@@ -380,7 +378,7 @@ static file_data_t *fat_dir(disk_t *disk_car, const partition_t *partition, dir_
{
log_info("FAT: cluster=%u(0x%x), pos=%lu\n",cluster,cluster,(long unsigned)(start/fat_sector_size(fat_header)));
}
- if(disk_car->pread(disk_car, buffer_dir + (uint64_t)cluster_size * nbr_cluster, cluster_size, start) != cluster_size)
+ if((unsigned)disk_car->pread(disk_car, buffer_dir + (uint64_t)cluster_size * nbr_cluster, cluster_size, start) != cluster_size)
{
log_error("FAT: Can't read directory cluster.\n");
stop=1;
@@ -446,7 +444,7 @@ static file_data_t *fat1x_rootdir(disk_t *disk_car, const partition_t *partition
unsigned char *buffer_dir;
buffer_dir=(unsigned char*)MALLOC(root_size);
start=partition->part_offset+(uint64_t)((le16(fat_header->reserved)+fat_header->fats*le16(fat_header->fat_length))*disk_car->sector_size);
- if(disk_car->pread(disk_car, buffer_dir, root_size, start) != root_size)
+ if((unsigned)disk_car->pread(disk_car, buffer_dir, root_size, start) != root_size)
{
log_error("FAT 1x: Can't read root directory.\n");
/* Don't return yet, it may have been a partial read */
@@ -555,7 +553,7 @@ static int fat_copy(disk_t *disk_car, const partition_t *partition, dir_data_t *
unsigned int toread = block_size;
if (toread > file_size)
toread = file_size;
- if(disk_car->pread(disk_car, buffer_file, toread, start) != toread)
+ if((unsigned)disk_car->pread(disk_car, buffer_file, toread, start) != toread)
{
log_error("fat_copy: Can't read cluster %u.\n", cluster);
}