Commit 5e93475964876436279bfe0cc714128e4004d52a
1 parent
017ffb30
MinGW make type warning in modbus-rtu.c (closes #181)
Thanks to Marjan Tomas
Showing
1 changed file
with
1 additions
and
1 deletions
src/modbus-rtu.c
| ... | ... | @@ -280,7 +280,7 @@ static ssize_t _modbus_rtu_send(modbus_t *ctx, const uint8_t *req, int req_lengt |
| 280 | 280 | #if defined(_WIN32) |
| 281 | 281 | modbus_rtu_t *ctx_rtu = ctx->backend_data; |
| 282 | 282 | DWORD n_bytes = 0; |
| 283 | - return (WriteFile(ctx_rtu->w_ser.fd, req, req_length, &n_bytes, NULL)) ? n_bytes : -1; | |
| 283 | + return (WriteFile(ctx_rtu->w_ser.fd, req, req_length, &n_bytes, NULL)) ? (ssize_t)n_bytes : -1; | |
| 284 | 284 | #else |
| 285 | 285 | #if HAVE_DECL_TIOCM_RTS |
| 286 | 286 | modbus_rtu_t *ctx_rtu = ctx->backend_data; | ... | ... |