summaryrefslogtreecommitdiffstats
path: root/src/partgpt.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/partgpt.c
parentc6e94c6adfe071f4510190069638d70d59675f42 (diff)
Fix some compilation warnings
Diffstat (limited to 'src/partgpt.c')
-rw-r--r--src/partgpt.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/partgpt.c b/src/partgpt.c
index 6615d50..b32e383 100644
--- a/src/partgpt.c
+++ b/src/partgpt.c
@@ -43,7 +43,6 @@
#include <sys/uuid.h>
#endif
#include "common.h"
-#include "testdisk.h"
#include "fnctdsk.h"
#include "lang.h"
#include "intrf.h"
@@ -53,8 +52,6 @@
#include "cramfs.h"
#include "ext2.h"
#include "fat.h"
-#include "hfs.h"
-#include "hfsp.h"
#include "jfs_superblock.h"
#include "jfs.h"
#include "ntfs.h"
@@ -66,7 +63,6 @@
#include "guid_cpy.h"
#include "unicode.h"
#include "crc.h"
-#include "partgptn.h"
extern const arch_fnct_t arch_i386;
@@ -164,7 +160,7 @@ list_part_t *read_part_gpt(disk_t *disk_car, const int verbose, const int savehe
gpt=(struct gpt_hdr*)MALLOC(disk_car->sector_size);
screen_buffer_reset();
- if(disk_car->pread(disk_car, gpt, disk_car->sector_size, disk_car->sector_size) != disk_car->sector_size)
+ if((unsigned)disk_car->pread(disk_car, gpt, disk_car->sector_size, disk_car->sector_size) != disk_car->sector_size)
{
free(gpt);
return NULL;
@@ -262,7 +258,7 @@ list_part_t *read_part_gpt(disk_t *disk_car, const int verbose, const int savehe
}
gpt_entries=(struct gpt_ent*)MALLOC(gpt_entries_size);
- if(disk_car->pread(disk_car, gpt_entries, gpt_entries_size, gpt_entries_offset) != gpt_entries_size)
+ if((unsigned)disk_car->pread(disk_car, gpt_entries, gpt_entries_size, gpt_entries_offset) != gpt_entries_size)
{
free(gpt_entries);
free(gpt);
@@ -479,13 +475,13 @@ static int write_part_gpt(disk_t *disk_car, const list_part_t *list_part, const
gpt->hdr_lba_alt=le64((disk_car->disk_size-1)/disk_car->sector_size);
gpt->hdr_lba_table=le64(1+1);
gpt->hdr_crc_self=le32(get_crc32(gpt, le32(gpt->hdr_size), 0xFFFFFFFF)^0xFFFFFFFF);
- if(disk_car->pwrite(disk_car, gpt_entries, gpt_entries_size, le64(gpt->hdr_lba_table) * disk_car->sector_size) != gpt_entries_size)
+ if((unsigned)disk_car->pwrite(disk_car, gpt_entries, gpt_entries_size, le64(gpt->hdr_lba_table) * disk_car->sector_size) != gpt_entries_size)
{
free(gpt);
free(gpt_entries);
return 1;
}
- if(disk_car->pwrite(disk_car, gpt, disk_car->sector_size, le64(gpt->hdr_lba_self) * disk_car->sector_size) != disk_car->sector_size)
+ if((unsigned)disk_car->pwrite(disk_car, gpt, disk_car->sector_size, le64(gpt->hdr_lba_self) * disk_car->sector_size) != disk_car->sector_size)
{
free(gpt);
free(gpt_entries);
@@ -495,13 +491,13 @@ static int write_part_gpt(disk_t *disk_car, const list_part_t *list_part, const
gpt->hdr_lba_alt=le64(1);
gpt->hdr_lba_table=le64((disk_car->disk_size-1 - gpt_entries_size)/disk_car->sector_size);
gpt->hdr_crc_self=le32(get_crc32(gpt, le32(gpt->hdr_size), 0xFFFFFFFF)^0xFFFFFFFF);
- if(disk_car->pwrite(disk_car, gpt_entries, gpt_entries_size, le64(gpt->hdr_lba_table) * disk_car->sector_size) != gpt_entries_size)
+ if((unsigned)disk_car->pwrite(disk_car, gpt_entries, gpt_entries_size, le64(gpt->hdr_lba_table) * disk_car->sector_size) != gpt_entries_size)
{
free(gpt);
free(gpt_entries);
return 1;
}
- if(disk_car->pwrite(disk_car, gpt, disk_car->sector_size, le64(gpt->hdr_lba_self) * disk_car->sector_size) != disk_car->sector_size)
+ if((unsigned)disk_car->pwrite(disk_car, gpt, disk_car->sector_size, le64(gpt->hdr_lba_self) * disk_car->sector_size) != disk_car->sector_size)
{
free(gpt);
free(gpt_entries);
@@ -656,7 +652,7 @@ static int check_part_gpt(disk_t *disk_car,const int verbose,partition_t *partit
if(ret!=0)
ret=check_NTFS(disk_car,partition,verbose,0);
if(ret!=0)
- ret=check_JFS(disk_car,partition,verbose);
+ ret=check_JFS(disk_car, partition);
if(ret!=0)
ret=check_rfs(disk_car,partition,verbose);
if(ret!=0)