unsigned int i;
int default_ok = 1;
static char *ms = NULL;
- static int mslen = 0;
+ static size_t mslen = 0;
if (!ms || strlen(mesg)+100 > mslen) {
mslen = strlen(mesg)+200;
int i, read = 0;
struct partition *p = ptes[n].part_table;
struct partition *q = ptes[ext_index].part_table;
- long long llimit;
unsigned long long start, stop = 0, limit, temp,
first[partitions], last[partitions];
if (n < 4) {
start = sector_offset;
if (display_in_cyl_units || !total_number_of_sectors)
- llimit = heads * sectors * cylinders - 1;
+ limit = heads * sectors * cylinders - 1;
else
- llimit = total_number_of_sectors - 1;
- limit = llimit;
- if (limit != llimit)
- limit = 0x7fffffff;
+ limit = total_number_of_sectors - 1;
+
+ if (limit > UINT_MAX)
+ limit = UINT_MAX;
+
if (extended_offset) {
first[ext_index] = extended_offset;
last[ext_index] = get_start_sect(q) +
#define MAX_PER_LINE 16
static void
print_buffer(unsigned char pbuffer[]) {
- int i,
- l;
+ unsigned int i, l;
for (i = 0, l = 0; i < sector_size; i++, l++) {
if (l == 0)
fclose(procpt);
}
-static void
-dummy(int *kk) {}
+static void dummy(int *kk __attribute__ ((__unused__))) {}
static void
unknown_command(int c) {
}
static int
-xbsd_initlabel (struct partition *p, struct xbsd_disklabel *d, int pindex) {
+xbsd_initlabel (struct partition *p, struct xbsd_disklabel *d,
+ int pindex __attribute__((__unused__))) {
struct xbsd_partition *pp;
struct geom g;
void
sgi_set_bootfile(const char* aFile) {
- int i = 0;
if (sgi_check_bootfile(aFile)) {
+ size_t i = 0;
while (i < 16) {
if ((aFile[i] != '\n') /* in principle caught again by next line */
&& (strlen(aFile) > i))
void verify_sun(void)
{
uint32_t starts[SUN_NUM_PARTITIONS], lens[SUN_NUM_PARTITIONS], start, stop;
- int i,j,k,starto,endo;
+ uint32_t i,j,k,starto,endo;
int array[SUN_NUM_PARTITIONS];
verify_sun_starts = starts;
int whole_disk = 0;
char mesg[256];
- int i, first, last;
+ int i;
+ unsigned int first, last;
if (part->num_sectors && tag->tag != SSWAP16(SUN_TAG_UNASSIGNED)) {
printf(_("Partition %d is already defined. Delete "