summaryrefslogtreecommitdiff
path: root/src/shared/dlt_user_shared.c
diff options
context:
space:
mode:
authoriod1hc <toan.dinhcong@vn.bosch.com>2020-11-04 17:49:06 +0700
committerSaya Sugiura <39760799+ssugiura@users.noreply.github.com>2021-01-06 09:27:28 +0900
commit2e8dade01beef3d8b6e6b812690c1f64d3408ce2 (patch)
treec91f9494790c6dc97ee34bfe1735aa60d158b9df /src/shared/dlt_user_shared.c
parent72c2ea521e1002996f423b56293adf21f6f00ea6 (diff)
downloadDLT-daemon-2e8dade01beef3d8b6e6b812690c1f64d3408ce2.tar.gz
shared: fix conversion warnings
- Data type of 'textlength' create a lot of warnings while using in function 'snprintf()', so change data type to 'size_t' will resolve these warnings. - Change data type of variable 'size' to the right type 'unsigned int', which is located in struct DltBuffer in dlt_common.h (line 832). Signed-off-by: Dinh Cong Toan <toan.dinhcong@vn.bosch.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
Diffstat (limited to 'src/shared/dlt_user_shared.c')
-rw-r--r--src/shared/dlt_user_shared.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/dlt_user_shared.c b/src/shared/dlt_user_shared.c
index 732301c..90b2623 100644
--- a/src/shared/dlt_user_shared.c
+++ b/src/shared/dlt_user_shared.c
@@ -117,7 +117,7 @@ DltReturnValue dlt_user_log_out2(int handle, void *ptr1, size_t len1, void *ptr2
iov[1].iov_base = ptr2;
iov[1].iov_len = len2;
- bytes_written = writev(handle, iov, 2);
+ bytes_written = (uint32_t) writev(handle, iov, 2);
if (bytes_written != (len1 + len2))
return DLT_RETURN_ERROR;
@@ -141,7 +141,7 @@ DltReturnValue dlt_user_log_out3(int handle, void *ptr1, size_t len1, void *ptr2
iov[2].iov_base = ptr3;
iov[2].iov_len = len3;
- bytes_written = writev(handle, iov, 3);
+ bytes_written = (uint32_t) writev(handle, iov, 3);
if (bytes_written != (len1 + len2 + len3)) {
switch (errno) {
@@ -175,4 +175,4 @@ DltReturnValue dlt_user_log_out3(int handle, void *ptr1, size_t len1, void *ptr2
}
return DLT_RETURN_OK;
-}
+} \ No newline at end of file