From 360ccb0463aa7cf766d3a8228558cdc6478309a1 Mon Sep 17 00:00:00 2001 From: Dinh Cong Toan Date: Thu, 19 Nov 2020 18:41:13 +0700 Subject: 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 --- src/daemon/dlt_daemon_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/daemon/dlt_daemon_common.c') diff --git a/src/daemon/dlt_daemon_common.c b/src/daemon/dlt_daemon_common.c index b57b33e..5273433 100644 --- a/src/daemon/dlt_daemon_common.c +++ b/src/daemon/dlt_daemon_common.c @@ -845,7 +845,7 @@ DltDaemonContext *dlt_daemon_context_add(DltDaemon *daemon, if ((user_list->num_contexts % DLT_DAEMON_CONTEXT_ALLOC_SIZE) == 0) { /* allocate memory for context in steps of DLT_DAEMON_CONTEXT_ALLOC_SIZE, e.g 100 */ old = user_list->contexts; - user_list->contexts = (DltDaemonContext *)malloc(sizeof(DltDaemonContext) * + user_list->contexts = (DltDaemonContext *)malloc((size_t) sizeof(DltDaemonContext) * ((user_list->num_contexts / DLT_DAEMON_CONTEXT_ALLOC_SIZE) + 1) * DLT_DAEMON_CONTEXT_ALLOC_SIZE); @@ -858,7 +858,7 @@ DltDaemonContext *dlt_daemon_context_add(DltDaemon *daemon, memcpy(user_list->contexts, old, - sizeof(DltDaemonContext) * user_list->num_contexts); + (size_t) sizeof(DltDaemonContext) * user_list->num_contexts); free(old); } } -- cgit v1.2.1