Date: Sat, 25 May 2002 23:53:58 -0700 (PDT) From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 11899 for review Message-ID: <200205260653.g4Q6rw259170@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=11899 Change 11899 by marcel@marcel_nfs on 2002/05/25 23:53:50 Fix format string warnings when compiling on ia64 (off_t arg with %llu format and the likes). Affected files ... ... //depot/projects/ia64/sbin/gpt/gpt.c#4 edit ... //depot/projects/ia64/sbin/gpt/map.c#2 edit Differences ... ==== //depot/projects/ia64/sbin/gpt/gpt.c#4 (text+ko) ==== @@ -223,7 +223,8 @@ } if (verbose) warnx("%s: mediasize=%llu; sectorsize=%u; blocks=%llu", - device_name, mediasz, secsz, mediasz / secsz); + device_name, (long long)mediasz, secsz, + (long long)(mediasz / secsz)); map_init(mediasz / secsz); @@ -297,7 +298,7 @@ if (crc32(hdr, hdr->hdr_size) != crc) { if (verbose) warnx("%s: Bad CRC in GPT header at sector %llu", - device_name, lba); + device_name, (long long)lba); goto fail_hdr; } @@ -310,12 +311,13 @@ if (crc32(ent, tblsz) != hdr->hdr_crc_table) { if (verbose) warnx("%s: Bad CRC in GPT table at sector %llu", - device_name, hdr->hdr_lba_table); + device_name, (long long)hdr->hdr_lba_table); goto fail_ent; } if (verbose) - warnx("%s: found GPT at sector %llu", device_name, lba); + warnx("%s: found GPT at sector %llu", device_name, + (long long)lba); m = map_add(lba, 1, (lba == 1) ? MAP_TYPE_GPT : MAP_TYPE_TPG, hdr); if (m == NULL) @@ -440,7 +442,8 @@ } /* Don't create more than maxparts entries. */ - if ((blocks - 1) * secsz > maxparts * sizeof(struct gpt_ent)) { + if ((uint64_t)(blocks - 1) * secsz > + maxparts * sizeof(struct gpt_ent)) { blocks = (maxparts * sizeof(struct gpt_ent)) / secsz; if ((maxparts * sizeof(struct gpt_ent)) % secsz) blocks++; ==== //depot/projects/ia64/sbin/gpt/map.c#2 (text+ko) ==== @@ -70,7 +70,7 @@ if (n->map_start == start && n->map_size == size) { if (n->map_type != MAP_TYPE_UNUSED) warnx("warning: part(%llu,%llu) mirrored", - start, size); + (long long)start, (long long)size); n->map_type = type; n->map_data = data; return (n); @@ -78,7 +78,8 @@ if (n->map_type != MAP_TYPE_UNUSED) { warnx("error: part(%llu,%llu) overlaps part(%llu,%llu)", - start, size, n->map_start, n->map_size); + (long long)start, (long long)size, (long long)n->map_start, + (long long)n->map_size); return (0); } @@ -201,7 +202,8 @@ printf("GPT part\t"); break; } - printf("start=%llu, blocks=%llu\n", m->map_start, m->map_size); + printf("start=%llu, blocks=%llu\n", (long long)m->map_start, + (long long)m->map_size); m = m->map_next; } } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205260653.g4Q6rw259170>