summaryrefslogtreecommitdiff
path: root/src/console
diff options
context:
space:
mode:
authorFelix Herrmann <fherrmann@de.adit-jv.com>2020-01-13 10:40:25 +0100
committerSaya Sugiura <39760799+ssugiura@users.noreply.github.com>2020-07-06 10:04:07 +0900
commit676e8fc1ba927dc84df82b508d796e31d9fd120c (patch)
tree141271d339f1ba68d0b29fd124e8eaa5d3d99fd4 /src/console
parentec391decd94ac9f6c6133c24a41c8afb2c01623f (diff)
downloadDLT-daemon-676e8fc1ba927dc84df82b508d796e31d9fd120c.tar.gz
fix some gcc9 compiler warnings
Many stringop-truncation and stringop-overflow warnings are still there (so many). https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/ Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
Diffstat (limited to 'src/console')
-rw-r--r--src/console/dlt-sortbytimestamp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/console/dlt-sortbytimestamp.c b/src/console/dlt-sortbytimestamp.c
index 71ad2a4..f840ef1 100644
--- a/src/console/dlt-sortbytimestamp.c
+++ b/src/console/dlt-sortbytimestamp.c
@@ -422,8 +422,8 @@ int main(int argc, char *argv[]) {
qsort((void *) timestamp_index, message_count, sizeof(TimestampIndex), compare_index_systime);
for (num = begin; num <= end; num++) {
- delta_tmsp = abs(timestamp_index[num + 1].tmsp - timestamp_index[num].tmsp);
- delta_systime = abs(timestamp_index[num + 1].systmsp - timestamp_index[num].systmsp);
+ delta_tmsp = (uint32_t)llabs((int64_t)timestamp_index[num + 1].tmsp - timestamp_index[num].tmsp);
+ delta_systime = (uint32_t)llabs((int64_t)timestamp_index[num + 1].systmsp - timestamp_index[num].systmsp);
/*
* Here is a try to detect a new cycle of boot in system.