Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/dist/pdisk fix some powerpc64 build issues.
details: https://anonhg.NetBSD.org/src/rev/3a96e04276ae
branches: trunk
changeset: 753271:3a96e04276ae
user: mrg <mrg%NetBSD.org@localhost>
date: Mon Mar 22 05:08:54 2010 +0000
description:
fix some powerpc64 build issues.
diffstat:
dist/pdisk/file_media.c | 4 ++--
dist/pdisk/layout_dump.c | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diffs (56 lines):
diff -r 064b0c157462 -r 3a96e04276ae dist/pdisk/file_media.c
--- a/dist/pdisk/file_media.c Mon Mar 22 03:35:26 2010 +0000
+++ b/dist/pdisk/file_media.c Mon Mar 22 05:08:54 2010 +0000
@@ -270,7 +270,7 @@
} else if (offset < 0 || offset % a->m.grain != 0) {
/* can't handle offset */
fprintf(stderr,"bad offset\n");
- } else if (offset + count > a->m.size_in_bytes && a->m.size_in_bytes != (long long) 0) {
+ } else if (offset + (long long) count > a->m.size_in_bytes && a->m.size_in_bytes != (long long) 0) {
/* check for offset (and offset+count) too large */
fprintf(stderr,"offset+count too large\n");
} else if (offset + count > (long long) LOFF_MAX) {
@@ -318,7 +318,7 @@
off = offset;
if ((off = llseek(a->fd, off, 0)) >= 0) {
if ((t = write(a->fd, address, count)) == (ssize_t)count) {
- if (off + count > a->m.size_in_bytes) {
+ if (off + (long long) count > a->m.size_in_bytes) {
a->m.size_in_bytes = off + count;
}
rtn_value = 1;
diff -r 064b0c157462 -r 3a96e04276ae dist/pdisk/layout_dump.c
--- a/dist/pdisk/layout_dump.c Mon Mar 22 03:35:26 2010 +0000
+++ b/dist/pdisk/layout_dump.c Mon Mar 22 05:08:54 2010 +0000
@@ -90,7 +90,7 @@
byte_length = entry->bit_length / 8;
if (entry->bit_offset != 0 || (entry->bit_length % 8) != 0) {
- printf("entry %d, can't handle bitfields yet.\n", entry - desc);
+ printf("entry %d, can't handle bitfields yet.\n", (int)(entry - desc));
continue;
}
@@ -102,11 +102,11 @@
}
} else {
if (entry->bit_offset < 0 || entry->bit_offset > 8) {
- printf("entry %d, bad bit offset (%d).\n", entry - desc, entry->bit_offset);
+ printf("entry %d, bad bit offset (%d).\n", (int)(entry - desc), entry->bit_offset);
continue;
} else if (entry->bit_length <= 0
|| entry->bit_length > (entry->bit_offset + 1)) {
- printf("entry %d, bad bit length (%d,%d).\n", entry - desc,
+ printf("entry %d, bad bit length (%d,%d).\n", (int)(entry - desc),
entry->bit_offset, entry->bit_length);
continue;
}
@@ -141,7 +141,7 @@
}
break;
default:
- printf("entry %d, unknown format (%d).\n", entry - desc, entry->format);
+ printf("entry %d, unknown format (%d).\n", (int)(entry - desc), entry->format);
break;
}
}
Home |
Main Index |
Thread Index |
Old Index