diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-08-05 20:02:02 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-08-05 20:02:02 -0700 |
| commit | 8732b2bcd2bb6953c0d01766b71ef68a0fac2453 (patch) | |
| tree | ecb2682929ef9c2e78e9958716dcf660d44cf62d | |
| parent | 96dbf571b34a97dec67c81369feb0d00a8f412f1 (diff) | |
| download | nng-8732b2bcd2bb6953c0d01766b71ef68a0fac2453.tar.gz nng-8732b2bcd2bb6953c0d01766b71ef68a0fac2453.tar.bz2 nng-8732b2bcd2bb6953c0d01766b71ef68a0fac2453.zip | |
Fix warninsg about size types found in 64-bit windows build.
| -rw-r--r-- | src/platform/windows/win_impl.h | 2 | ||||
| -rw-r--r-- | src/platform/windows/win_net.c | 6 | ||||
| -rw-r--r-- | src/transport/ipc/ipc.c | 8 | ||||
| -rw-r--r-- | src/transport/tcp/tcp.c | 8 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/platform/windows/win_impl.h b/src/platform/windows/win_impl.h index a2700485..6455fd5c 100644 --- a/src/platform/windows/win_impl.h +++ b/src/platform/windows/win_impl.h @@ -68,7 +68,7 @@ struct nni_win_event { nni_cv cv; unsigned run : 1; unsigned fini : 1; - int count; + unsigned count; int status; nni_win_event_ops ops; }; diff --git a/src/platform/windows/win_net.c b/src/platform/windows/win_net.c index df6275ff..63295a71 100644 --- a/src/platform/windows/win_net.c +++ b/src/platform/windows/win_net.c @@ -140,7 +140,7 @@ nni_win_tcp_pipe_start(nni_win_event *evt, nni_aio *aio) // Put the AIOs in Windows form. for (i = 0; i < aio->a_niov; i++) { iov[i].buf = aio->a_iov[i].iov_buf; - iov[i].len = aio->a_iov[i].iov_len; + iov[i].len = (ULONG) aio->a_iov[i].iov_len; } if ((s = pipe->s) == INVALID_SOCKET) { @@ -185,8 +185,8 @@ nni_win_tcp_pipe_cancel(nni_win_event *evt) static void nni_win_tcp_pipe_finish(nni_win_event *evt, nni_aio *aio) { - int rv; - DWORD cnt; + int rv; + size_t cnt; cnt = evt->count; if ((rv = evt->status) == 0) { diff --git a/src/transport/ipc/ipc.c b/src/transport/ipc/ipc.c index e8c7968f..51051681 100644 --- a/src/transport/ipc/ipc.c +++ b/src/transport/ipc/ipc.c @@ -31,10 +31,10 @@ struct nni_ipc_pipe { uint8_t txhead[1 + sizeof(uint64_t)]; uint8_t rxhead[1 + sizeof(uint64_t)]; - int gottxhead; - int gotrxhead; - int wanttxhead; - int wantrxhead; + size_t gottxhead; + size_t gotrxhead; + size_t wanttxhead; + size_t wantrxhead; nni_aio *user_txaio; nni_aio *user_rxaio; diff --git a/src/transport/tcp/tcp.c b/src/transport/tcp/tcp.c index a42fa377..d36f5690 100644 --- a/src/transport/tcp/tcp.c +++ b/src/transport/tcp/tcp.c @@ -34,10 +34,10 @@ struct nni_tcp_pipe { uint8_t txlen[sizeof(uint64_t)]; uint8_t rxlen[sizeof(uint64_t)]; - int gottxhead; - int gotrxhead; - int wanttxhead; - int wantrxhead; + size_t gottxhead; + size_t gotrxhead; + size_t wanttxhead; + size_t wantrxhead; nni_aio txaio; nni_aio rxaio; nni_aio negaio; |
