Commit 9e4e3dbd authored by Michael Jerris's avatar Michael Jerris

resolve msvc level 3 64 bit warnings

darcs-hash:20060919212846-16063-2e6c7c40d1edf44fa28915fd0105838e7d31e7bf.gz
parent 708e615a
...@@ -113,7 +113,7 @@ ssize_t sres_recvfrom(sres_socket_t s, void *b, size_t len, int flags, ...@@ -113,7 +113,7 @@ ssize_t sres_recvfrom(sres_socket_t s, void *b, size_t len, int flags,
int retval; int retval;
if (fromlen) if (fromlen)
ilen = *fromlen; ilen = *fromlen;
retval = recvfrom(s, b, len, flags, from, fromlen ? &ilen : NULL); retval = recvfrom(s, b, (int)len, flags, from, fromlen ? &ilen : NULL);
if (fromlen) if (fromlen)
*fromlen = ilen; *fromlen = ilen;
return (ssize_t)retval; return (ssize_t)retval;
......
...@@ -128,11 +128,11 @@ HTABLE_SCOPE void prefix##_remove(prefix##_t *, entry_t const *e) ...@@ -128,11 +128,11 @@ HTABLE_SCOPE void prefix##_remove(prefix##_t *, entry_t const *e)
HTABLE_SCOPE \ HTABLE_SCOPE \
int prefix##_resize(su_home_t *home, \ int prefix##_resize(su_home_t *home, \
prefix##_t pr[], \ prefix##_t pr[], \
unsigned new_size) \ size_t new_size) \
{ \ { \
entry_t **new_hash; \ entry_t **new_hash; \
entry_t **old_hash = pr->pr##_table; \ entry_t **old_hash = pr->pr##_table; \
unsigned old_size; \ usize_t old_size; \
unsigned i, j, i0; \ unsigned i, j, i0; \
unsigned again = 0, used = 0, collisions = 0; \ unsigned again = 0, used = 0, collisions = 0; \
\ \
...@@ -221,7 +221,8 @@ void prefix##_insert(prefix##_t *pr, entry_t const *e) \ ...@@ -221,7 +221,8 @@ void prefix##_insert(prefix##_t *pr, entry_t const *e) \
HTABLE_SCOPE \ HTABLE_SCOPE \
void prefix##_remove(prefix##_t *pr, entry_t const *e) \ void prefix##_remove(prefix##_t *pr, entry_t const *e) \
{ \ { \
unsigned i, j, k, size = pr->pr##_size; \ unsigned i, j, k; \
usize_t size = pr->pr##_size; \
entry_t **htable = pr->pr##_table; \ entry_t **htable = pr->pr##_table; \
\ \
/* Search for entry */ \ /* Search for entry */ \
......
...@@ -221,7 +221,7 @@ typedef size_t su_ioveclen_t; ...@@ -221,7 +221,7 @@ typedef size_t su_ioveclen_t;
#if SU_HAVE_WINSOCK #if SU_HAVE_WINSOCK
/* WSABUF */ /* WSABUF */
struct su_iovec_s { struct su_iovec_s {
u_long siv_len; usize_t siv_len;
void *siv_base; void *siv_base;
}; };
typedef u_long su_ioveclen_t; typedef u_long su_ioveclen_t;
......
...@@ -3155,7 +3155,7 @@ int tport_send_msg(tport_t *self, msg_t *msg, ...@@ -3155,7 +3155,7 @@ int tport_send_msg(tport_t *self, msg_t *msg,
self->tp_time = su_time_ms(now = su_now()); self->tp_time = su_time_ms(now = su_now());
n = tport_vsend(self, msg, tpn, iov, iovused, cc); n = tport_vsend(self, msg, tpn, iov, (int)iovused, cc);
SU_DEBUG_9(("tport_vsend returned %d\n", n)); SU_DEBUG_9(("tport_vsend returned %d\n", n));
if (n < 0) if (n < 0)
...@@ -3173,7 +3173,7 @@ int tport_send_msg(tport_t *self, msg_t *msg, ...@@ -3173,7 +3173,7 @@ int tport_send_msg(tport_t *self, msg_t *msg,
if (tport_is_connection_oriented(self)) { if (tport_is_connection_oriented(self)) {
iov[i].mv_len -= n - total; iov[i].mv_len -= n - total;
iov[i].mv_base = (char *)iov[i].mv_base + (n - total); iov[i].mv_base = (char *)iov[i].mv_base + (n - total);
if (tport_queue_rest(self, msg, &iov[i], iovused - i) >= 0) if (tport_queue_rest(self, msg, &iov[i], (int)(iovused - i)) >= 0)
return n; return n;
} }
else { else {
...@@ -3237,7 +3237,8 @@ int tport_vsend(tport_t *self, ...@@ -3237,7 +3237,8 @@ int tport_vsend(tport_t *self,
tport_dump_iovec(self, msg, n, iov, iovused, "sent", "to"); tport_dump_iovec(self, msg, n, iov, iovused, "sent", "to");
if (tport_log->log_level >= 7) { if (tport_log->log_level >= 7) {
int i, m = 0; int i;
size_t m = 0;
for (i = 0; i < iovused; i++) for (i = 0; i < iovused; i++)
m += iov[i].mv_len; m += iov[i].mv_len;
...@@ -3319,7 +3320,7 @@ int tport_queue_rest(tport_t *self, ...@@ -3319,7 +3320,7 @@ int tport_queue_rest(tport_t *self,
msg_iovec_t iov[], msg_iovec_t iov[],
int iovused) int iovused)
{ {
int iovlen = self->tp_iovlen; usize_t iovlen = self->tp_iovlen;
assert(tport_is_connection_oriented(self)); assert(tport_is_connection_oriented(self));
assert(self->tp_queue == NULL || assert(self->tp_queue == NULL ||
...@@ -3569,7 +3570,8 @@ void tport_send_event(tport_t *self) ...@@ -3569,7 +3570,8 @@ void tport_send_event(tport_t *self)
static static
void tport_send_queue(tport_t *self) void tport_send_queue(tport_t *self)
{ {
int n, i, total; int n, i;
size_t total;
msg_t *msg; msg_t *msg;
msg_iovec_t *iov; msg_iovec_t *iov;
int iovused; int iovused;
......
...@@ -194,7 +194,7 @@ struct tport_s { ...@@ -194,7 +194,7 @@ struct tport_s {
unsigned tp_unsentlen; /**< Number of unsent iovecs */ unsigned tp_unsentlen; /**< Number of unsent iovecs */
msg_iovec_t *tp_iov; /**< Iovecs allocated for sending */ msg_iovec_t *tp_iov; /**< Iovecs allocated for sending */
unsigned tp_iovlen; /**< Number of allocated iovecs */ usize_t tp_iovlen; /**< Number of allocated iovecs */
/* ==== Extensions ===================================================== */ /* ==== Extensions ===================================================== */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment