diff options
author | Dinh Cong Toan <toan.dinhcong@vn.bosch.com> | 2020-11-19 18:41:13 +0700 |
---|---|---|
committer | Saya Sugiura <39760799+ssugiura@users.noreply.github.com> | 2021-01-06 09:27:28 +0900 |
commit | 360ccb0463aa7cf766d3a8228558cdc6478309a1 (patch) | |
tree | 9a324da77335ab1ae25e614c892ad98acac030dd /include/dlt | |
parent | 906578850094f8f5e9ce488c71ad831b2f35330c (diff) | |
download | DLT-daemon-360ccb0463aa7cf766d3a8228558cdc6478309a1.tar.gz |
other: fix remaining conversion warnings
- Converting datatype to the correct one.
- As macro do not perform type-checking before, so these functions used
it with different datatype could create a lot of conversion warnings.
For this reason, these warnings could be consider as normal
information and will not be fixed.
Signed-off-by: Dinh Cong Toan <toan.dinhcong@vn.bosch.com>
Diffstat (limited to 'include/dlt')
-rw-r--r-- | include/dlt/dlt_common.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/dlt/dlt_common.h b/include/dlt/dlt_common.h index 8cd9052..3e7100e 100644 --- a/include/dlt/dlt_common.h +++ b/include/dlt/dlt_common.h @@ -297,7 +297,7 @@ enum { # define DLT_MSG_READ_VALUE(dst, src, length, type) \ { \ - if ((length < 0) || ((length) < ((int32_t)sizeof(type)))) \ + if ((length < 0) || ((length) < ((int32_t) sizeof(type)))) \ { length = -1; } \ else \ { dst = *((type *)src); src += sizeof(type); length -= (int32_t) sizeof(type); } \ @@ -319,7 +319,7 @@ enum { } \ else \ { \ - memcpy(dst, src, length); \ + memcpy(dst, src, (size_t) length); \ dlt_clean_string(dst, length); \ dst[length] = 0; \ src += length; \ |