*/
struct superswitch *ss;
struct supertype *st;
- unsigned long besttime = 0;
+ time_t besttime = 0;
int bestsuper = -1;
int i;
struct GPT_part_entry *part;
unsigned long long curr_part_end;
unsigned all_partitions, entry_size;
- int part_nr;
+ unsigned part_nr;
*endofpart = 0;
struct MBR boot_sect;
struct MBR_part_record *part;
unsigned long long curr_part_end;
- int part_nr;
+ unsigned part_nr;
int retval = 0;
*endofpart = 0;
continue;
n = read(dfd, buf, sizeof(buf));
close(dfd);
- if (n <= 0 || n >= sizeof(buf))
+ if (n <= 0 || (unsigned)n >= sizeof(buf))
continue;
buf[n] = 0;
if (sscanf(buf, "%d:%d", &major, &minor) != 2)
if ((S_IFMT & st->st_mode) == S_IFBLK) {
if (major(st->st_rdev) == MD_MAJOR)
return minor(st->st_rdev);
- else if (major(st->st_rdev) == get_mdp_major())
+ else if (major(st->st_rdev) == (unsigned)get_mdp_major())
return -1- (minor(st->st_rdev)>>MdpMinorShift);
/* must be an extended-minor partition. Look at the