diff options
author | marcel <marcel@FreeBSD.org> | 2014-03-29 03:55:58 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2014-03-29 03:55:58 +0000 |
commit | f017f60135463f7ec96f7ec33488fa034a511996 (patch) | |
tree | 7724f65fd08c037c0d7eb826d88a3fa348096c40 | |
parent | 4aafbd0ea159fb94e869d65ba27afc9ca3344005 (diff) | |
download | FreeBSD-src-f017f60135463f7ec96f7ec33488fa034a511996.zip FreeBSD-src-f017f60135463f7ec96f7ec33488fa034a511996.tar.gz |
Make this build on ia64 w/ gcc.
-rw-r--r-- | gpt.c | 2 | ||||
-rw-r--r-- | mkimg.c | 6 |
2 files changed, 4 insertions, 4 deletions
@@ -124,7 +124,7 @@ crc32(const void *buf, size_t sz) } static u_int -gpt_tblsz() +gpt_tblsz(void) { u_int ents; @@ -239,7 +239,7 @@ sparse_write(int fd, const char *buf, size_t sz) wrsz = 0; p = memchr(buf, 0, sz); while (sz > 0) { - len = (p != NULL) ? p - buf : sz; + len = (p != NULL) ? (size_t)(p - buf) : sz; if (len > 0) { len = (len + secsz - 1) & ~(secsz - 1); if (len > sz) @@ -422,14 +422,14 @@ main(int argc, char *argv[]) errc(EX_DATAERR, error, "number of heads"); break; case 'P': /* GEOMETRY: PHYSICAL SECTOR SIZE */ - error = parse_number(&blksz, 512, INT_MAX + 1, optarg); + error = parse_number(&blksz, 512, INT_MAX+1U, optarg); if (error == 0 && !pwr_of_two(blksz)) error = EINVAL; if (error) errc(EX_DATAERR, error, "physical sector size"); break; case 'S': /* GEOMETRY: LOGICAL SECTOR SIZE */ - error = parse_number(&secsz, 512, INT_MAX + 1, optarg); + error = parse_number(&secsz, 512, INT_MAX+1U, optarg); if (error == 0 && !pwr_of_two(secsz)) error = EINVAL; if (error) |