summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/daemon/dlt_daemon_socket.c2
-rw-r--r--src/offlinelogstorage/dlt_offline_logstorage_behavior.c20
-rw-r--r--src/shared/dlt_common.c4
3 files changed, 13 insertions, 13 deletions
diff --git a/src/daemon/dlt_daemon_socket.c b/src/daemon/dlt_daemon_socket.c
index 63a1a12..d4fa8b8 100644
--- a/src/daemon/dlt_daemon_socket.c
+++ b/src/daemon/dlt_daemon_socket.c
@@ -192,7 +192,7 @@ int dlt_daemon_socket_sendreliable(int sock, void *data_buffer, int message_size
int data_sent = 0;
while (data_sent < message_size) {
- ssize_t ret = send(sock, data_buffer + data_sent, message_size - data_sent, 0);
+ ssize_t ret = send(sock, (char *)data_buffer + data_sent, message_size - data_sent, 0);
if (ret < 0) {
dlt_vlog(LOG_WARNING,
diff --git a/src/offlinelogstorage/dlt_offline_logstorage_behavior.c b/src/offlinelogstorage/dlt_offline_logstorage_behavior.c
index 8b27111..3f7555e 100644
--- a/src/offlinelogstorage/dlt_offline_logstorage_behavior.c
+++ b/src/offlinelogstorage/dlt_offline_logstorage_behavior.c
@@ -519,8 +519,8 @@ DLT_STATIC int dlt_logstorage_find_dlt_header(void *ptr,
char substring[] = { 'D', 'L', 'T', 0x01 };
while (cnt > 0) {
- if (*((char *)(ptr + offset + index)) == 'D') {
- if (strncmp(ptr + offset + index, substring, 4) == 0)
+ if (*((char *)ptr + offset + index) == 'D') {
+ if (strncmp((char *)ptr + offset + index, substring, 4) == 0)
return index;
}
@@ -548,9 +548,9 @@ DLT_STATIC int dlt_logstorage_find_last_dlt_header(void *ptr,
char substring[] = {'D', 'L', 'T', 0x01};
while(cnt > 0)
{
- if (*((char *)(ptr + offset + cnt)) == 'D')
+ if (*((char *)ptr + offset + cnt) == 'D')
{
- if (strncmp(ptr + offset + cnt, substring, 4) == 0)
+ if (strncmp((char *)ptr + offset + cnt, substring, 4) == 0)
{
return cnt;
}
@@ -653,7 +653,7 @@ DLT_STATIC int dlt_logstorage_sync_to_file(DltLogStorageFilterConfig *config,
}
}
- ret = fwrite(config->cache + start_offset + start_index, count, 1,
+ ret = fwrite((char *)config->cache + start_offset + start_index, count, 1,
config->log);
dlt_logstorage_check_write_ret(config, ret);
@@ -691,7 +691,7 @@ DLT_STATIC int dlt_logstorage_sync_to_file(DltLogStorageFilterConfig *config,
}
}
- ret = fwrite(config->cache + start_offset + start_index, count, 1,
+ ret = fwrite((char *)config->cache + start_offset + start_index, count, 1,
config->log);
dlt_logstorage_check_write_ret(config, ret);
@@ -962,7 +962,7 @@ int dlt_logstorage_write_msg_cache(DltLogStorageFilterConfig *config,
DltLogStorageCacheFooter *footer = NULL;
int msg_size;
int remain_cache_size;
- void *curr_write_addr = NULL;
+ char *curr_write_addr = NULL;
int ret = 0;
unsigned int cache_size;
@@ -983,7 +983,7 @@ int dlt_logstorage_write_msg_cache(DltLogStorageFilterConfig *config,
cache_size = config->file_size;
}
- footer = (DltLogStorageCacheFooter *)(config->cache + cache_size);
+ footer = (DltLogStorageCacheFooter *)((char *)config->cache + cache_size);
if (footer == NULL)
{
dlt_log(LOG_ERR, "Cannot retrieve cache footer. Address is NULL\n");
@@ -994,7 +994,7 @@ int dlt_logstorage_write_msg_cache(DltLogStorageFilterConfig *config,
if (msg_size <= remain_cache_size) /* add at current position */
{
- curr_write_addr = (void *)(config->cache + footer->offset);
+ curr_write_addr = (char *)config->cache + footer->offset;
footer->offset += msg_size;
if (footer->wrap_around_cnt < 1) {
footer->end_sync_offset = footer->offset;
@@ -1123,7 +1123,7 @@ int dlt_logstorage_sync_msg_cache(DltLogStorageFilterConfig *config,
cache_size = config->file_size;
}
- footer = (DltLogStorageCacheFooter *)(config->cache + cache_size);
+ footer = (DltLogStorageCacheFooter *)((char *)config->cache + cache_size);
if (footer == NULL)
{
dlt_log(LOG_ERR, "Cannot retrieve cache information\n");
diff --git a/src/shared/dlt_common.c b/src/shared/dlt_common.c
index b4916ed..a36139c 100644
--- a/src/shared/dlt_common.c
+++ b/src/shared/dlt_common.c
@@ -2046,7 +2046,7 @@ int dlt_receiver_check_and_get(DltReceiver *receiver,
unsigned int flags)
{
unsigned int min_size = to_get;
- void *src = NULL;
+ char *src = NULL;
if (flags & DLT_RCV_SKIP_HEADER)
min_size += sizeof(DltUserHeader);
@@ -2057,7 +2057,7 @@ int dlt_receiver_check_and_get(DltReceiver *receiver,
!dest)
return DLT_RETURN_WRONG_PARAMETER;
- src = (void *)receiver->buf;
+ src = receiver->buf;
if (flags & DLT_RCV_SKIP_HEADER)
src += sizeof(DltUserHeader);