diff --git a/configure.ac b/configure.ac index 88984bb0..ee216ec0 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ AC_INIT([testdisk],[7.1-WIP],[grenier@cgsecurity.org]) AC_LANG(C) sinclude(acx_pthread.m4) sinclude(mkdir.m4) -TESTDISKDATE="March 2018" +TESTDISKDATE="April 2018" AC_SUBST(TESTDISKDATE) AC_DEFINE_UNQUOTED([TESTDISKDATE],"$TESTDISKDATE",[Date of release]) AC_CONFIG_AUX_DIR(config) diff --git a/src/dirn.c b/src/dirn.c index dbf4fa32..ab18db9c 100644 --- a/src/dirn.c +++ b/src/dirn.c @@ -49,6 +49,7 @@ static int copy_dir(WINDOW *window, disk_t *disk, const partition_t *partition, static int copy_selection(file_info_t*dir_list, WINDOW *window, disk_t *disk, const partition_t *partition, dir_data_t *dir_data, unsigned int *copy_ok, unsigned int *copy_bad); #define INTER_DIR (LINES-25+15) +#define MAX_DIR_NBR 256 static int copy_progress(WINDOW *window, const unsigned int copy_ok, const unsigned int copy_bad) { @@ -577,7 +578,6 @@ static long int dir_aff_ncurses(disk_t *disk, const partition_t *partition, dir_ static int dir_partition_aux(disk_t *disk, const partition_t *partition, dir_data_t *dir_data, const unsigned long int inode, const unsigned int depth, char**current_cmd) { -#define MAX_DIR_NBR 256 static unsigned long int inode_known[MAX_DIR_NBR]; if(depth==MAX_DIR_NBR) return 1; /* subdirectories depth is too high => Back */ diff --git a/src/file_fits.c b/src/file_fits.c index 606772fd..12065ec0 100644 --- a/src/file_fits.c +++ b/src/file_fits.c @@ -116,7 +116,7 @@ static data_check_t data_check_fits(const unsigned char *buffer, const unsigned { unsigned int i=file_recovery->calculated_file_size - file_recovery->file_size + buffer_size/2; if(memcmp(&buffer[i], "XTENSION", 8)!=0) - break; + break; { const unsigned int i_org=i; const uint64_t tmp=fits_info(buffer, buffer_size, file_recovery, &i); diff --git a/src/photorec.c b/src/photorec.c index 0273a39e..d8b0da17 100644 --- a/src/photorec.c +++ b/src/photorec.c @@ -706,16 +706,16 @@ void set_filename(file_recovery_t *file_recovery, struct ph_param *params) if(file_recovery->extension==NULL || file_recovery->extension[0]=='\0') { snprintf(file_recovery->filename,sizeof(file_recovery->filename)-1, - "%s.%u/%c%07u", params->recup_dir, + "%s.%u/%c%07lu", params->recup_dir, params->dir_num, (broken?'b':'f'), - (unsigned int)((file_recovery->location.start - params->partition->part_offset)/ params->disk->sector_size)); + (unsigned long int)((file_recovery->location.start - params->partition->part_offset)/ params->disk->sector_size)); } else { snprintf(file_recovery->filename,sizeof(file_recovery->filename)-1, - "%s.%u/%c%07u.%s", params->recup_dir, + "%s.%u/%c%07lu.%s", params->recup_dir, params->dir_num, (broken?'b':'f'), - (unsigned int)((file_recovery->location.start - params->partition->part_offset) / params->disk->sector_size), file_recovery->extension); + (unsigned long int)((file_recovery->location.start - params->partition->part_offset) / params->disk->sector_size), file_recovery->extension); } } diff --git a/src/types.h b/src/types.h index 48932d6c..22b53e02 100644 --- a/src/types.h +++ b/src/types.h @@ -24,9 +24,9 @@ #ifdef HAVE_INTTYPES_H #include #else - #ifdef HAVE_STDINT_H - #include - #endif +#ifdef HAVE_STDINT_H +#include +#endif #endif #ifdef HAVE_SYS_TYPES_H #include