From 2f0b8355f43c589990934bdf1127e36278feaa1a Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Mon, 4 Oct 2010 12:11:15 +0200 Subject: [PATCH] Fix compiler warning on Win32 when calling send()/recv() --- src/modbus-tcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modbus-tcp.c b/src/modbus-tcp.c index 85d04f5..4e9955d 100644 --- a/src/modbus-tcp.c +++ b/src/modbus-tcp.c @@ -129,11 +129,11 @@ ssize_t _modbus_tcp_send(modbus_t *ctx, const uint8_t *req, int req_length) Requests not to send SIGPIPE on errors on stream oriented sockets when the other end breaks the connection. The EPIPE error is still returned. */ - return send(ctx->s, req, req_length, MSG_NOSIGNAL); + return send(ctx->s, (const char*)req, req_length, MSG_NOSIGNAL); } ssize_t _modbus_tcp_recv(modbus_t *ctx, uint8_t *rsp, int rsp_length) { - return recv(ctx->s, rsp, rsp_length, 0); + return recv(ctx->s, (char *)rsp, rsp_length, 0); } int _modbus_tcp_check_integrity(modbus_t *ctx, uint8_t *msg, const int msg_length) -- libgit2 0.21.4