diff options
author | iod1hc <toan.dinhcong@vn.bosch.com> | 2020-11-05 19:29:45 +0700 |
---|---|---|
committer | Saya Sugiura <39760799+ssugiura@users.noreply.github.com> | 2021-01-06 09:27:28 +0900 |
commit | 699d52298bfde3ab5721a78264d5a4f4e2f326ef (patch) | |
tree | d1f59052c1f77e860971fec19032333907d58c22 /src/daemon/dlt_daemon_connection.c | |
parent | 2e8dade01beef3d8b6e6b812690c1f64d3408ce2 (diff) | |
download | DLT-daemon-699d52298bfde3ab5721a78264d5a4f4e2f326ef.tar.gz |
daemon: fix conversion warnings
- Instead of casting frequently, change the data type of 'to_remove' to
'uint32_t' for the correct format, also adding temp variable to check
return value.
- Change data type of 2 variable 'offset' and 'sizecont' to 'size_t'
(dlt_daemon_client.c), because these variable using many time with
function 'sizeof', and they was used as local variable so it will not
effect dlt library.
Signed-off-by: Dinh Cong Toan <toan.dinhcong@vn.bosch.com>
Diffstat (limited to 'src/daemon/dlt_daemon_connection.c')
-rw-r--r-- | src/daemon/dlt_daemon_connection.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/daemon/dlt_daemon_connection.c b/src/daemon/dlt_daemon_connection.c index a438c03..78346fd 100644 --- a/src/daemon/dlt_daemon_connection.c +++ b/src/daemon/dlt_daemon_connection.c @@ -86,7 +86,7 @@ DLT_STATIC int dlt_connection_send(DltConnection *conn, case DLT_CONNECTION_CLIENT_MSG_TCP: ret = dlt_daemon_socket_sendreliable(conn->receiver->fd, msg, - msg_size); + (int) msg_size); return ret; default: return DLT_DAEMON_ERROR_UNKNOWN; @@ -125,10 +125,10 @@ int dlt_connection_send_multiple(DltConnection *con, sizeof(dltSerialHeader)); if ((data1 != NULL) && (ret == DLT_RETURN_OK)) - ret = dlt_connection_send(con, data1, size1); + ret = dlt_connection_send(con, data1, (size_t) size1); if ((data2 != NULL) && (ret == DLT_RETURN_OK)) - ret = dlt_connection_send(con, data2, size2); + ret = dlt_connection_send(con, data2, (size_t) size2); return ret; } |