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_serial.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_serial.c')
-rw-r--r-- | src/daemon/dlt_daemon_serial.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/daemon/dlt_daemon_serial.c b/src/daemon/dlt_daemon_serial.c index 36b7990..1b6507d 100644 --- a/src/daemon/dlt_daemon_serial.c +++ b/src/daemon/dlt_daemon_serial.c @@ -76,13 +76,13 @@ int dlt_daemon_serial_send(int sock, void *data1, int size1, void *data2, int si /* Send data */ if (data1 && (size1 > 0)) - if (0 > write(sock, data1, size1)) + if (0 > write(sock, data1, (size_t) size1)) return DLT_DAEMON_ERROR_SEND_FAILED; if (data2 && (size2 > 0)) - if (0 > write(sock, data2, size2)) + if (0 > write(sock, data2, (size_t) size2)) return DLT_DAEMON_ERROR_SEND_FAILED; return DLT_DAEMON_ERROR_OK; |