summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/dlt-daemon
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended/dlt-daemon')
-rw-r--r--meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-CMakeLists.txt-make-CONFIGURATION_FILES_DIR-aligned.patch42
-rw-r--r--meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-Fix-kinds-of-build-failure.patch5
-rw-r--r--meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-dlt-daemon.c-fix-wrong-len.patch37
-rw-r--r--meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-fix-build-failure-when-systemd-is-enabled.patch15
-rw-r--r--meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-warnings-Fix-clang-generated-warnings.patch1003
-rw-r--r--meta-oe/recipes-extended/dlt-daemon/dlt-daemon/char_conversion.patch27
-rw-r--r--meta-oe/recipes-extended/dlt-daemon/dlt-daemon_3.0.0.bb10
7 files changed, 1130 insertions, 9 deletions
diff --git a/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-CMakeLists.txt-make-CONFIGURATION_FILES_DIR-aligned.patch b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-CMakeLists.txt-make-CONFIGURATION_FILES_DIR-aligned.patch
new file mode 100644
index 0000000000..2d51253e69
--- /dev/null
+++ b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-CMakeLists.txt-make-CONFIGURATION_FILES_DIR-aligned.patch
@@ -0,0 +1,42 @@
1From bad5d689a69dca3d1dc3e7653946f1205661afbf Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Fri, 10 Apr 2026 13:25:39 +0800
4Subject: [PATCH 1/2] CMakeLists.txt: make CONFIGURATION_FILES_DIR aligned
5
6Commit [723e90e dlt: Adaptation for QNX build system with SDP 7.x
7(#609)], refer [1], make CONFIGURATION_FILES_DIR not aligned. the CMake
8variable CONFIGURATION_FILES_DIR set to CMAKE_INSTALL_SYSCONFDIR, but
9the tell the compiler to define macro CONFIGURATION_FILES_DIR as
10${CMAKE_INSTALL_PREFIX}/${CONFIGURATION_FILES_DIR}.
11
12At least for linux, this will cause failure of the systemd service. Eg:
13if CMAKE_INSTALL_PREFIX is /usr, then the configuration file is
14installed under ${CONFIGURATION_FILES_DIR}, usually is /etc. But the
15application like dlt-daemon/dlt-system will find the default
16configuration file under /usr/etc. This makes service start failed.
17
18[1] https://github.com/COVESA/dlt-daemon/commit/723e90e77db91130375238a592b9a292302a32bb
19
20Upstream-Status: Submitted [https://github.com/COVESA/dlt-daemon/issues/848]
21
22Signed-off-by: Changqing Li <changqing.li@windriver.com>
23---
24 CMakeLists.txt | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
27diff --git a/CMakeLists.txt b/CMakeLists.txt
28index bb9250f..821730a 100644
29--- a/CMakeLists.txt
30+++ b/CMakeLists.txt
31@@ -289,7 +289,7 @@ endif()
32
33 set(CONFIGURATION_FILES_DIR ${CMAKE_INSTALL_SYSCONFDIR})
34
35-add_definitions(-DCONFIGURATION_FILES_DIR="${CMAKE_INSTALL_PREFIX}/${CONFIGURATION_FILES_DIR}")
36+add_definitions(-DCONFIGURATION_FILES_DIR="${CONFIGURATION_FILES_DIR}")
37
38 add_subdirectory(cmake)
39
40--
412.34.1
42
diff --git a/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-Fix-kinds-of-build-failure.patch b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-Fix-kinds-of-build-failure.patch
index 403d1089e2..ff840b809d 100644
--- a/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-Fix-kinds-of-build-failure.patch
+++ b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-Fix-kinds-of-build-failure.patch
@@ -27,7 +27,8 @@ src/console/dlt-control-common.c:922:25: error: cast discards 'const' qualifier
27 27
28Use explicit type conversion to make the build can pass 28Use explicit type conversion to make the build can pass
29 29
30Upstream-Status: Submitted [https://github.com/COVESA/dlt-daemon/pull/826] 30Upstream-Status: Submitted [https://github.com/COVESA/dlt-daemon/pull/826,
31https://github.com/COVESA/dlt-daemon/pull/837]
31 32
32Signed-off-by: Changqing Li <changqing.li@windriver.com> 33Signed-off-by: Changqing Li <changqing.li@windriver.com>
33--- 34---
@@ -102,7 +103,7 @@ index 4c40cda8..b3408773 100644
102- memcpy(data, data1, size1); 103- memcpy(data, data1, size1);
103- memcpy(data + size1, data2, size2); 104- memcpy(data + size1, data2, size2);
104+ memcpy(data, data1, (size_t)size1); 105+ memcpy(data, data1, (size_t)size1);
105+ memcpy((int*)data + size1, data2, (size_t)size2); 106+ memcpy((char*)data + size1, data2, (size_t)size2);
106 107
107- if (sendto(g_udp_sock_fd, data, size1 + size2, 0, (struct sockaddr *)&clientinfo->clientaddr, 108- if (sendto(g_udp_sock_fd, data, size1 + size2, 0, (struct sockaddr *)&clientinfo->clientaddr,
108+ if (sendto(g_udp_sock_fd, data, (size_t)(size1 + size2), 0, (struct sockaddr *)&clientinfo->clientaddr, 109+ if (sendto(g_udp_sock_fd, data, (size_t)(size1 + size2), 0, (struct sockaddr *)&clientinfo->clientaddr,
diff --git a/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-dlt-daemon.c-fix-wrong-len.patch b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-dlt-daemon.c-fix-wrong-len.patch
new file mode 100644
index 0000000000..bac7691c32
--- /dev/null
+++ b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-dlt-daemon.c-fix-wrong-len.patch
@@ -0,0 +1,37 @@
1From 7e94c281563ff0eb67e521cf0a6fc3049f732214 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Wed, 15 Apr 2026 16:52:19 +0800
4Subject: [PATCH] dlt-daemon.c: fix wrong len
5
6Set len to 0 makes the application description always empty.
7One of the failure case:
8Running "dlt-example-user 'test'",
9Check "dlt-control -j localhost", will not get application description:
10APID:LOG-
11
12Expected:
13APID:LOG- Test Application for Logging
14
15Upstream-Status: Backport [https://github.com/COVESA/dlt-daemon/pull/852]
16
17Signed-off-by: Changqing Li <changqing.li@windriver.com>
18---
19 src/daemon/dlt-daemon.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22diff --git a/src/daemon/dlt-daemon.c b/src/daemon/dlt-daemon.c
23index 8c318a4..38fe824 100644
24--- a/src/daemon/dlt-daemon.c
25+++ b/src/daemon/dlt-daemon.c
26@@ -4110,7 +4110,7 @@ int dlt_daemon_process_user_message_register_application(DltDaemon *daemon,
27 to_remove = (uint32_t) temp;
28 }
29
30- len = 0;
31+ len = userapp.description_length;
32
33 if (len > DLT_DAEMON_DESCSIZE) {
34 len = DLT_DAEMON_DESCSIZE;
35--
362.34.1
37
diff --git a/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-fix-build-failure-when-systemd-is-enabled.patch b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-fix-build-failure-when-systemd-is-enabled.patch
index d19a23cd9c..b1ba08a7d3 100644
--- a/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-fix-build-failure-when-systemd-is-enabled.patch
+++ b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-fix-build-failure-when-systemd-is-enabled.patch
@@ -1,4 +1,4 @@
1From 28322f951bb8510ddb4cf767426a67c81ce826ab Mon Sep 17 00:00:00 2001 1From 6a95cc20d3c5adfc5c16f269f6dca9f7e2305b4e Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com> 2From: Changqing Li <changqing.li@windriver.com>
3Date: Tue, 17 Mar 2026 13:04:11 +0800 3Date: Tue, 17 Mar 2026 13:04:11 +0800
4Subject: [PATCH] fix build failure when systemd is enabled 4Subject: [PATCH] fix build failure when systemd is enabled
@@ -42,10 +42,10 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com>
42 src/system/dlt-system-logfile.c | 4 +-- 42 src/system/dlt-system-logfile.c | 4 +--
43 src/system/dlt-system-process-handling.c | 2 +- 43 src/system/dlt-system-process-handling.c | 2 +-
44 src/system/dlt-system-processes.c | 2 +- 44 src/system/dlt-system-processes.c | 2 +-
45 src/system/dlt-system-syslog.c | 6 ++-- 45 src/system/dlt-system-syslog.c | 8 ++---
46 src/system/dlt-system-watchdog.c | 8 ++--- 46 src/system/dlt-system-watchdog.c | 8 ++---
47 systemd/3rdparty/sd-daemon.c | 5 +-- 47 systemd/3rdparty/sd-daemon.c | 5 +--
48 10 files changed, 40 insertions(+), 42 deletions(-) 48 10 files changed, 41 insertions(+), 43 deletions(-)
49 49
50diff --git a/src/daemon/dlt-daemon.c b/src/daemon/dlt-daemon.c 50diff --git a/src/daemon/dlt-daemon.c b/src/daemon/dlt-daemon.c
51index ef42f89..8c318a4 100644 51index ef42f89..8c318a4 100644
@@ -329,10 +329,10 @@ index c35596c..b17b8ee 100644
329 329
330 /* go through all process files in directory */ 330 /* go through all process files in directory */
331diff --git a/src/system/dlt-system-syslog.c b/src/system/dlt-system-syslog.c 331diff --git a/src/system/dlt-system-syslog.c b/src/system/dlt-system-syslog.c
332index 59e9d3f..d6b1b8a 100644 332index 59e9d3f..f0bf3dc 100644
333--- a/src/system/dlt-system-syslog.c 333--- a/src/system/dlt-system-syslog.c
334+++ b/src/system/dlt-system-syslog.c 334+++ b/src/system/dlt-system-syslog.c
335@@ -88,7 +88,7 @@ int init_socket(SyslogOptions opts) 335@@ -88,11 +88,11 @@ int init_socket(SyslogOptions opts)
336 #ifdef DLT_USE_IPv6 336 #ifdef DLT_USE_IPv6
337 syslog_addr.sin6_family = AF_INET6; 337 syslog_addr.sin6_family = AF_INET6;
338 syslog_addr.sin6_addr = in6addr_any; 338 syslog_addr.sin6_addr = in6addr_any;
@@ -341,6 +341,11 @@ index 59e9d3f..d6b1b8a 100644
341 #else 341 #else
342 syslog_addr.sin_family = AF_INET; 342 syslog_addr.sin_family = AF_INET;
343 syslog_addr.sin_addr.s_addr = INADDR_ANY; 343 syslog_addr.sin_addr.s_addr = INADDR_ANY;
344- syslog_addr.sin_port = htons(opts.Port);
345+ syslog_addr.sin_port = htons((uint16_t)opts.Port);
346 memset(&(syslog_addr.sin_zero), 0, 8);
347 #endif
348
344@@ -117,7 +117,7 @@ int read_socket(int sock) 349@@ -117,7 +117,7 @@ int read_socket(int sock)
345 struct sockaddr_in client_addr; 350 struct sockaddr_in client_addr;
346 socklen_t addr_len = sizeof(struct sockaddr_in); 351 socklen_t addr_len = sizeof(struct sockaddr_in);
diff --git a/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-warnings-Fix-clang-generated-warnings.patch b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-warnings-Fix-clang-generated-warnings.patch
new file mode 100644
index 0000000000..208e433e53
--- /dev/null
+++ b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-warnings-Fix-clang-generated-warnings.patch
@@ -0,0 +1,1003 @@
1From 74b36fab6e7e66ca470b7b2ca2a494edd8c673d5 Mon Sep 17 00:00:00 2001
2From: Khem Raj <khem.raj@oss.qualcomm.com>
3Date: Fri, 10 Apr 2026 23:42:05 -0700
4Subject: [PATCH] warnings: Fix clang generated warnings
5
6This patch ensures that it can compile with clang-22
7
8Upstream-Status: Submitted [https://github.com/COVESA/dlt-daemon/pull/850]
9Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
10---
11 CMakeLists.txt | 3 +
12 examples/example1/example1.c | 2 +-
13 examples/example1_v2/example1.c | 2 +-
14 examples/example2/example2.c | 2 +-
15 examples/example2_v2/example2.c | 2 +-
16 examples/example3/example3.c | 2 +-
17 examples/example3_v2/example3.c | 2 +-
18 examples/example4/example4.c | 2 +-
19 examples/example4_v2/example4.c | 2 +-
20 src/console/dlt-control-v2.c | 2 +-
21 src/console/dlt-passive-node-ctrl.c | 8 +--
22 src/console/dlt-receive-v2.c | 2 +-
23 src/console/dlt-sortbytimestamp.c | 2 +-
24 src/console/logstorage/dlt-logstorage-ctrl.c | 2 +-
25 src/daemon/dlt-daemon.c | 6 +-
26 src/daemon/dlt-daemon.h | 2 +-
27 src/daemon/dlt_daemon_client.c | 6 +-
28 src/examples/dlt-example-filetransfer.c | 8 ++-
29 .../dlt-example-multicast-clientmsg-view.c | 4 +-
30 src/examples/dlt-example-user-common-api.c | 2 +-
31 src/examples/dlt-example-user-func-v2.c | 2 +-
32 src/examples/dlt-example-user-func.c | 2 +-
33 src/examples/dlt-example-user-v2.c | 4 +-
34 src/examples/dlt-example-user.c | 2 +-
35 src/lib/dlt_env_ll.c | 3 +-
36 src/lib/dlt_user.c | 70 +++++++++----------
37 .../dlt_offline_logstorage.c | 2 +-
38 src/shared/dlt_log.c | 8 +--
39 src/system/dlt-system-journal.c | 8 ++-
40 src/system/dlt-system-process-handling.c | 2 +-
41 src/system/dlt-system-shell.c | 2 +-
42 src/system/dlt-system.h | 4 +-
43 src/tests/dlt-test-client-v2.c | 2 +-
44 src/tests/dlt-test-fork-handler-v2.c | 2 +-
45 src/tests/dlt-test-fork-handler.c | 2 +-
46 src/tests/dlt-test-multi-process-v2.c | 8 +--
47 src/tests/dlt-test-multi-process.c | 8 +--
48 src/tests/dlt-test-non-verbose.c | 4 +-
49 src/tests/dlt-test-preregister-context-v2.c | 2 +-
50 src/tests/dlt-test-preregister-context.c | 2 +-
51 src/tests/dlt-test-qnx-slogger.c | 2 +-
52 src/tests/dlt-test-stress-client-v2.c | 2 +-
53 src/tests/dlt-test-stress-user-v2.c | 2 +-
54 src/tests/dlt-test-stress-v2.c | 2 +-
55 src/tests/dlt-test-stress.c | 2 +-
56 src/tests/dlt-test-user-v2.c | 2 +-
57 src/tests/dlt-test-user.c | 2 +-
58 tests/dlt_test_receiver.c | 2 +-
59 48 files changed, 110 insertions(+), 108 deletions(-)
60
61--- a/CMakeLists.txt
62+++ b/CMakeLists.txt
63@@ -261,7 +261,11 @@ add_compile_options(
64 -Wcast-qual
65 -Wno-system-headers
66 -Wno-unused-function
67- -Wno-stringop-truncation
68+ $<$<AND:$<COMPILE_LANGUAGE:C>,$<C_COMPILER_ID:Clang>>:-Wno-gnu-statement-expression-from-macro-expansion>
69+ $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:Clang>>:-Wno-gnu-statement-expression-from-macro-expansion>
70+ $<$<CXX_COMPILER_ID:Clang>:-Wno-gnu-zero-variadic-macro-arguments>
71+ $<$<AND:$<COMPILE_LANGUAGE:C>,$<C_COMPILER_ID:GNU>>:-Wno-stringop-truncation>
72+ $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:GNU>>:-Wno-stringop-truncation>
73 )
74
75 if(WITH_DOC STREQUAL "OFF")
76--- a/examples/example1/example1.c
77+++ b/examples/example1/example1.c
78@@ -50,7 +50,7 @@
79
80 DLT_DECLARE_CONTEXT(con_exa1);
81
82-int main()
83+int main(void)
84 {
85 struct timespec ts;
86
87--- a/examples/example1_v2/example1.c
88+++ b/examples/example1_v2/example1.c
89@@ -50,7 +50,7 @@
90
91 DLT_DECLARE_CONTEXT(con_exa1);
92
93-int main()
94+int main(void)
95 {
96 struct timespec ts;
97
98--- a/examples/example2/example2.c
99+++ b/examples/example2/example2.c
100@@ -52,7 +52,7 @@
101
102 DLT_DECLARE_CONTEXT(con_exa2);
103
104-int main()
105+int main(void)
106 {
107 int num;
108 struct timespec ts;
109--- a/examples/example2_v2/example2.c
110+++ b/examples/example2_v2/example2.c
111@@ -52,7 +52,7 @@
112
113 DLT_DECLARE_CONTEXT(con_exa2);
114
115-int main()
116+int main(void)
117 {
118 int num;
119 struct timespec ts;
120--- a/examples/example3/example3.c
121+++ b/examples/example3/example3.c
122@@ -52,7 +52,7 @@
123
124 DLT_DECLARE_CONTEXT(con_exa3);
125
126-int main()
127+int main(void)
128 {
129 int num;
130 struct timespec ts;
131--- a/examples/example3_v2/example3.c
132+++ b/examples/example3_v2/example3.c
133@@ -52,7 +52,7 @@
134
135 DLT_DECLARE_CONTEXT(con_exa3);
136
137-int main()
138+int main(void)
139 {
140 int num;
141 struct timespec ts;
142--- a/examples/example4/example4.c
143+++ b/examples/example4/example4.c
144@@ -50,7 +50,7 @@
145
146 DLT_DECLARE_CONTEXT(con_exa1);
147
148-int main()
149+int main(void)
150 {
151 unsigned char buffer[256];
152 int num;
153--- a/examples/example4_v2/example4.c
154+++ b/examples/example4_v2/example4.c
155@@ -50,7 +50,7 @@
156
157 DLT_DECLARE_CONTEXT(con_exa1);
158
159-int main()
160+int main(void)
161 {
162 unsigned char buffer[256];
163 int num;
164--- a/src/console/dlt-control-v2.c
165+++ b/src/console/dlt-control-v2.c
166@@ -129,7 +129,7 @@ typedef struct {
167 /**
168 * Print usage information of tool.
169 */
170-void usage()
171+void usage(void)
172 {
173 char version[255];
174
175--- a/src/console/dlt-passive-node-ctrl.c
176+++ b/src/console/dlt-passive-node-ctrl.c
177@@ -118,7 +118,7 @@ void set_node_id(char *id)
178 }
179 }
180
181-char *get_node_id()
182+char *get_node_id(void)
183 {
184 return g_options.node_id;
185 }
186@@ -211,7 +211,7 @@ static int dlt_passive_node_analyze_resp
187 *
188 * @return Pointer ot DltControlMsgBody, NULL otherwise
189 */
190-DltControlMsgBody *dlt_passive_node_prepare_message_body()
191+DltControlMsgBody *dlt_passive_node_prepare_message_body(void)
192 {
193 DltControlMsgBody *mb = calloc(1, sizeof(DltControlMsgBody));
194 char *ecuid = get_node_id();
195@@ -271,7 +271,7 @@ void dlt_passive_node_destroy_message_bo
196 *
197 * @return 0 on success, -1 on error
198 */
199-static int dlt_passive_node_ctrl_single_request()
200+static int dlt_passive_node_ctrl_single_request(void)
201 {
202 int ret = -1;
203
204@@ -301,7 +301,7 @@ static int dlt_passive_node_ctrl_single_
205 return ret;
206 }
207
208-static void usage()
209+static void usage(void)
210 {
211 printf("Usage: dlt-passive-node-ctrl [options]\n");
212 printf("Send a trigger to DLT daemon to (dis)connect a passive node "
213--- a/src/console/dlt-receive-v2.c
214+++ b/src/console/dlt-receive-v2.c
215@@ -144,7 +144,7 @@ typedef struct {
216 /**
217 * Print usage information of tool.
218 */
219-void usage()
220+void usage(void)
221 {
222 char version[255];
223
224--- a/src/console/dlt-sortbytimestamp.c
225+++ b/src/console/dlt-sortbytimestamp.c
226@@ -194,7 +194,7 @@ void write_messages(int ohandle, DltFile
227 /**
228 * Print usage information of tool.
229 */
230-void usage() {
231+void usage(void) {
232 char version[DLT_VERBUFSIZE];
233
234 dlt_get_version(version, DLT_VERBUFSIZE);
235--- a/src/console/logstorage/dlt-logstorage-ctrl.c
236+++ b/src/console/logstorage/dlt-logstorage-ctrl.c
237@@ -354,7 +354,7 @@ static int dlt_logstorage_ctrl_setup_eve
238 *
239 * @return 0 on success, -1 otherwise.
240 */
241-static int dlt_logstorage_ctrl_single_request()
242+static int dlt_logstorage_ctrl_single_request(void)
243 {
244 int ret = 0;
245
246--- a/src/daemon/dlt-daemon.c
247+++ b/src/daemon/dlt-daemon.c
248@@ -207,7 +207,7 @@ void close_pipes(int fds[2])
249 /**
250 * Print usage information of tool.
251 */
252-void usage()
253+void usage(void)
254 {
255 char version[DLT_DAEMON_TEXTBUFSIZE];
256 dlt_get_version(version, DLT_DAEMON_TEXTBUFSIZE);
257@@ -2489,7 +2489,7 @@ void dlt_daemon_local_cleanup(DltDaemon
258 free(daemon_local->flags.ipNodes);
259 }
260
261-void dlt_daemon_exit_trigger()
262+void dlt_daemon_exit_trigger(void)
263 {
264 /* stop event loop */
265 g_exit = -1;
266@@ -2655,7 +2655,7 @@ int dlt_daemon_log_internal(DltDaemon *d
267
268 msg.storageheadersizev2 = (uint32_t)(STORAGE_HEADER_V2_FIXED_SIZE + strlen(DLT_DAEMON_ECU_ID));
269 msg.baseheadersizev2 = BASE_HEADER_V2_FIXED_SIZE;
270- msg.baseheaderextrasizev2 = (int32_t)dlt_message_get_extraparameters_size_v2(msgcontent);
271+ msg.baseheaderextrasizev2 = (uint32_t)dlt_message_get_extraparameters_size_v2(msgcontent);
272 /* Ecu Id, App Id, Ctx Id and Session Id*/
273 msg.extendedheadersizev2 = (uint32_t)(1 + strlen(DLT_DAEMON_ECU_ID) + 1 + strlen(app_id) + 1 + strlen(ctx_id) + sizeof(uint32_t));
274
275--- a/src/daemon/dlt-daemon.h
276+++ b/src/daemon/dlt-daemon.h
277@@ -217,7 +217,7 @@ int dlt_daemon_local_connection_init(Dlt
278 int dlt_daemon_local_ecu_version_init(DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose);
279
280 void dlt_daemon_daemonize(int verbose);
281-void dlt_daemon_exit_trigger();
282+void dlt_daemon_exit_trigger(void);
283 void dlt_daemon_signal_handler(int sig);
284 #ifdef __QNX__
285 void dlt_daemon_cleanup_timers();
286--- a/src/daemon/dlt_daemon_client.c
287+++ b/src/daemon/dlt_daemon_client.c
288@@ -817,7 +817,7 @@ int dlt_daemon_client_send_control_messa
289
290 msg->storageheadersizev2 = (uint32_t)(STORAGE_HEADER_V2_FIXED_SIZE + (daemon->ecuid2len));
291 msg->baseheadersizev2 = BASE_HEADER_V2_FIXED_SIZE;
292- msg->baseheaderextrasizev2 = (int32_t)dlt_message_get_extraparameters_size_v2(DLT_CONTROL_MSG);
293+ msg->baseheaderextrasizev2 = (uint32_t)dlt_message_get_extraparameters_size_v2(DLT_CONTROL_MSG);
294 msg->extendedheadersizev2 = (uint32_t)((daemon->ecuid2len) + 1 + appidlen + 1 + ctxidlen + 1);
295
296 msg->headersizev2 = (int32_t)(msg->storageheadersizev2 + msg->baseheadersizev2 +
297@@ -5388,7 +5388,7 @@ void dlt_daemon_control_passive_node_con
298
299 con = &daemon_local->pGateway.connections[i];
300
301- resp->connection_status[i] = con->status;
302+ resp->connection_status[i] = (uint8_t)con->status;
303 //TBD: Review node_id[i * con->ecuid2len]
304 memcpy(&resp->node_id[i * con->ecuid2len], con->ecuid2, con->ecuid2len);
305 }
306@@ -5471,7 +5471,7 @@ void dlt_daemon_control_passive_node_con
307
308 con = &daemon_local->pGateway.connections[i];
309
310- resp->connection_status[i] = con->status;
311+ resp->connection_status[i] = (uint8_t)con->status;
312 memcpy(&resp->node_id[i * DLT_ID_SIZE], con->ecuid, DLT_ID_SIZE);
313 }
314
315--- a/src/examples/dlt-example-filetransfer.c
316+++ b/src/examples/dlt-example-filetransfer.c
317@@ -84,9 +84,10 @@ bool shutdownStatus = false;
318 * The function will set the flag (shutdownStatus) to true after .2 sec
319 * @return Null to stop thread
320 */
321-void *cancel_filetransfer()
322+void *cancel_filetransfer(void* arg)
323 {
324 // wait 200msec once a filetransfer is started and then set the flag to true
325+ (void)arg;
326 struct timespec ts;
327 ts.tv_sec = 0;
328 ts.tv_nsec = 200000000; // 200 ms
329@@ -99,8 +100,9 @@ void *cancel_filetransfer()
330 * The function will start dlt filetransfer and will throw error if status of shutdownStatus is high
331 * @return Null to stop thread
332 */
333-void *filetransfer()
334+void *filetransfer(void* arg)
335 {
336+ (void)arg;
337 int transferResult;
338
339 transferResult = dlt_user_log_file_header(&fileContext, file);
340@@ -125,7 +127,7 @@ void *filetransfer()
341 /**
342 * Print usage information of tool.
343 */
344-void usage()
345+void usage(void)
346 {
347 char version[255];
348
349--- a/src/examples/dlt-example-multicast-clientmsg-view.c
350+++ b/src/examples/dlt-example-multicast-clientmsg-view.c
351@@ -96,7 +96,7 @@ int dlt_receive_message_callback_udp(Dlt
352 {
353 static char text[DLT_RECEIVE_TEXTBUFSIZE];
354
355- if ((message == NULL)) {
356+ if (message == NULL) {
357 printf("NULL message in dlt_receive_message_callback_udp\n");
358 return -1;
359 }
360@@ -119,7 +119,7 @@ int dlt_receive_message_callback_udp(Dlt
361 }
362
363
364-int main()
365+int main(void)
366 {
367 struct clientinfostruct clientinfo;
368 struct ip_mreq mreq;
369--- a/src/examples/dlt-example-user-common-api.c
370+++ b/src/examples/dlt-example-user-common-api.c
371@@ -66,7 +66,7 @@ DLT_DECLARE_CONTEXT(mycontext)
372 /**
373 * Print usage information of tool.
374 */
375-void usage()
376+void usage(void)
377 {
378 char version[255];
379
380--- a/src/examples/dlt-example-user-func-v2.c
381+++ b/src/examples/dlt-example-user-func-v2.c
382@@ -84,7 +84,7 @@ DltContextData mycontextdata;
383 /**
384 * Print usage information of tool.
385 */
386-void usage()
387+void usage(void)
388 {
389 char version[255];
390
391--- a/src/examples/dlt-example-user-func.c
392+++ b/src/examples/dlt-example-user-func.c
393@@ -82,7 +82,7 @@ DltContextData mycontextdata;
394 /**
395 * Print usage information of tool.
396 */
397-void usage()
398+void usage(void)
399 {
400 char version[255];
401
402--- a/src/examples/dlt-example-user-v2.c
403+++ b/src/examples/dlt-example-user-v2.c
404@@ -88,7 +88,7 @@ DLT_DECLARE_CONTEXT(mycontext3)
405 /**
406 * Print usage information of tool.
407 */
408-void usage()
409+void usage(void)
410 {
411 char version[255];
412
413@@ -458,4 +458,4 @@ int dlt_user_injection_callback_with_spe
414 void dlt_user_log_level_changed_callback_v2(char *context_id, uint8_t log_level, uint8_t trace_status)
415 {
416 printf("Log level changed of context %s, LogLevel=%u, TraceState=%u\n", context_id, log_level, trace_status);
417-}
418\ No newline at end of file
419+}
420--- a/src/examples/dlt-example-user.c
421+++ b/src/examples/dlt-example-user.c
422@@ -86,7 +86,7 @@ DLT_DECLARE_CONTEXT(mycontext3)
423 /**
424 * Print usage information of tool.
425 */
426-void usage()
427+void usage(void)
428 {
429 char version[255];
430
431--- a/src/lib/dlt_env_ll.c
432+++ b/src/lib/dlt_env_ll.c
433@@ -125,7 +125,8 @@ int dlt_env_helper_to_lower(char **const
434
435 int dlt_env_extract_symbolic_ll(char **const env, int8_t *ll)
436 {
437- char result[strlen("verbose") + 1];
438+ char result[sizeof("verbose")];
439+
440
441 if (!env || !ll) {
442 return -1;
443--- a/src/lib/dlt_user.c
444+++ b/src/lib/dlt_user.c
445@@ -545,7 +545,7 @@ DltReturnValue dlt_init(void)
446
447 /* Check logging mode and internal log file is opened or not*/
448 if (logging_mode == DLT_LOG_TO_FILE && logging_handle == NULL) {
449- dlt_log_init(logging_mode);
450+ dlt_log_init((int)logging_mode);
451 }
452
453 /* Initialize common part of dlt_init()/dlt_init_file() */
454@@ -2391,14 +2391,14 @@ DltReturnValue dlt_set_application_ll_ts
455
456 /* Update local structures */
457 for (i = 0; i < dlt_user.dlt_ll_ts_num_entries; i++) {
458- dlt_user.dlt_ll_ts[i].log_level = loglevel;
459- dlt_user.dlt_ll_ts[i].trace_status = tracestatus;
460+ dlt_user.dlt_ll_ts[i].log_level = (int8_t)loglevel;
461+ dlt_user.dlt_ll_ts[i].trace_status = (int8_t)tracestatus;
462
463 if (dlt_user.dlt_ll_ts[i].log_level_ptr)
464- *(dlt_user.dlt_ll_ts[i].log_level_ptr) = loglevel;
465+ *(dlt_user.dlt_ll_ts[i].log_level_ptr) = (int8_t)loglevel;
466
467 if (dlt_user.dlt_ll_ts[i].trace_status_ptr)
468- *(dlt_user.dlt_ll_ts[i].trace_status_ptr) = tracestatus;
469+ *(dlt_user.dlt_ll_ts[i].trace_status_ptr) = (int8_t)tracestatus;
470 }
471
472 dlt_mutex_unlock();
473@@ -2413,7 +2413,7 @@ DltReturnValue dlt_set_application_ll_ts
474 }
475 }
476
477-int dlt_get_log_state()
478+int dlt_get_log_state(void)
479 {
480 return dlt_user.log_state;
481 }
482@@ -2500,25 +2500,6 @@ DltReturnValue dlt_user_log_write_start_
483 return DLT_RETURN_TRUE;
484 }
485
486-static DltReturnValue dlt_user_log_write_start_internal(DltContext *handle,
487- DltContextData *log,
488- DltLogLevelType loglevel,
489- uint32_t messageid,
490- bool is_verbose);
491-
492-inline DltReturnValue dlt_user_log_write_start(DltContext *handle, DltContextData *log, DltLogLevelType loglevel)
493-{
494- return dlt_user_log_write_start_internal(handle, log, loglevel, DLT_USER_DEFAULT_MSGID, true);
495-}
496-
497-DltReturnValue dlt_user_log_write_start_id(DltContext *handle,
498- DltContextData *log,
499- DltLogLevelType loglevel,
500- uint32_t messageid)
501-{
502- return dlt_user_log_write_start_internal(handle, log, loglevel, messageid, false);
503-}
504-
505 DltReturnValue dlt_user_log_write_start_internal(DltContext *handle,
506 DltContextData *log,
507 DltLogLevelType loglevel,
508@@ -2587,6 +2568,19 @@ DltReturnValue dlt_user_log_write_start_
509 return ret;
510 }
511
512+inline DltReturnValue dlt_user_log_write_start(DltContext *handle, DltContextData *log, DltLogLevelType loglevel)
513+{
514+ return dlt_user_log_write_start_internal(handle, log, loglevel, DLT_USER_DEFAULT_MSGID, true);
515+}
516+
517+DltReturnValue dlt_user_log_write_start_id(DltContext *handle,
518+ DltContextData *log,
519+ DltLogLevelType loglevel,
520+ uint32_t messageid)
521+{
522+ return dlt_user_log_write_start_internal(handle, log, loglevel, messageid, false);
523+}
524+
525 DltReturnValue dlt_user_log_write_start_w_given_buffer(DltContext *handle,
526 DltContextData *log,
527 DltLogLevelType loglevel,
528@@ -3746,7 +3740,7 @@ DltReturnValue dlt_user_trace_network_se
529 }
530
531 log.args_num = 0;
532- log.trace_status = nw_trace_type;
533+ log.trace_status = (int32_t)nw_trace_type;
534 log.size = 0;
535
536 gettimeofday(&tv, NULL);
537@@ -3848,7 +3842,7 @@ DltReturnValue dlt_user_trace_network_se
538 }
539
540 log.args_num = 0;
541- log.trace_status = nw_trace_type;
542+ log.trace_status = (int32_t)nw_trace_type;
543 log.size = 0;
544
545 /* Write identifier */
546@@ -3917,7 +3911,7 @@ DltReturnValue dlt_user_trace_network_se
547 }
548
549 log.args_num = 0;
550- log.trace_status = nw_trace_type;
551+ log.trace_status = (int32_t)nw_trace_type;
552 log.size = 0;
553
554 /* Write identifier */
555@@ -4184,7 +4178,7 @@ DltReturnValue dlt_user_trace_network_tr
556 }
557
558 log.args_num = 0;
559- log.trace_status = nw_trace_type;
560+ log.trace_status = (int32_t)nw_trace_type;
561 log.size = 0;
562
563 if (header == NULL)
564@@ -4556,7 +4550,7 @@ DltReturnValue dlt_log_raw_v2(DltContext
565 return DLT_RETURN_OK;
566 }
567
568-DltReturnValue dlt_log_marker()
569+DltReturnValue dlt_log_marker(void)
570 {
571 if (!DLT_USER_INITIALIZED) {
572 if (dlt_init() < DLT_RETURN_OK) {
573@@ -6299,8 +6293,8 @@ DltReturnValue dlt_send_app_ll_ts_limit(
574
575 /* set usercontext */
576 dlt_set_id(usercontext.apid, apid); /* application id */
577- usercontext.log_level = loglevel;
578- usercontext.trace_status = tracestatus;
579+ usercontext.log_level = (uint8_t)loglevel;
580+ usercontext.trace_status = (uint8_t)tracestatus;
581
582 if (dlt_user.dlt_is_file)
583 return DLT_RETURN_OK;
584@@ -6354,8 +6348,8 @@ DltReturnValue dlt_send_app_ll_ts_limit_
585 }
586 usercontext.apidlen = (uint8_t)apidlen_sz;
587 dlt_set_id_v2(usercontext.apid, apid, usercontext.apidlen); /* application id */
588- usercontext.log_level = loglevel;
589- usercontext.trace_status = tracestatus;
590+ usercontext.log_level = (uint8_t)loglevel;
591+ usercontext.trace_status = (uint8_t)tracestatus;
592
593 size_t buffersize = sizeof(uint8_t) + usercontext.apidlen + sizeof(uint8_t) + sizeof(uint8_t);
594 uint8_t buffer[DLT_ID_SIZE + 3];
595@@ -6435,7 +6429,7 @@ DltReturnValue dlt_user_log_send_log_mod
596 return DLT_RETURN_OK;
597 }
598
599-DltReturnValue dlt_user_log_send_marker()
600+DltReturnValue dlt_user_log_send_marker(void)
601 {
602 DltUserHeader userheader;
603 DltReturnValue ret;
604@@ -7349,7 +7343,7 @@ void dlt_user_test_corrupt_message_size(
605 #endif
606
607
608-int dlt_start_threads()
609+int dlt_start_threads(void)
610 {
611 struct timespec time_to_wait, single_wait;
612 struct timespec now;
613@@ -7438,7 +7432,7 @@ int dlt_start_threads()
614 return 0;
615 }
616
617-void dlt_stop_threads()
618+void dlt_stop_threads(void)
619 {
620 int dlt_housekeeperthread_result = 0;
621 int joined = 0;
622@@ -7510,7 +7504,7 @@ void dlt_stop_threads()
623 #endif /* DLT_NETWORK_TRACE_ENABLE */
624 }
625
626-static void dlt_fork_child_fork_handler()
627+static void dlt_fork_child_fork_handler(void)
628 {
629 g_dlt_is_child = 1;
630 dlt_user_init_state = INIT_UNITIALIZED;
631--- a/src/offlinelogstorage/dlt_offline_logstorage.c
632+++ b/src/offlinelogstorage/dlt_offline_logstorage.c
633@@ -1732,7 +1732,7 @@ DLT_STATIC int dlt_daemon_offline_setup_
634 continue;
635
636 /* check value and store temporary */
637- ret = dlt_logstorage_check_param(&tmp_data, i, value);
638+ ret = dlt_logstorage_check_param(&tmp_data, (DltLogstorageFilterConfType)i, value);
639
640 if (ret != 0) {
641 if (tmp_data.apids != NULL) {
642--- a/src/shared/dlt_log.c
643+++ b/src/shared/dlt_log.c
644@@ -113,7 +113,7 @@ DltReturnValue dlt_log_init_multiple_log
645 return result;
646 }
647
648-DltReturnValue dlt_log_init_single_logfile()
649+DltReturnValue dlt_log_init_single_logfile(void)
650 {
651 /* internal logging to file */
652 errno = 0;
653@@ -333,14 +333,14 @@ void dlt_log_free(void)
654 }
655 }
656
657-void dlt_log_free_single_logfile()
658+void dlt_log_free_single_logfile(void)
659 {
660 if (logging_handle != NULL) {
661 fclose(logging_handle);
662 }
663 }
664
665-void dlt_log_free_multiple_logfiles()
666+void dlt_log_free_multiple_logfiles(void)
667 {
668 if (DLT_RETURN_ERROR == multiple_files_buffer_free(&multiple_files_ring_buffer)) return;
669
670@@ -348,7 +348,7 @@ void dlt_log_free_multiple_logfiles()
671 multiple_files_ring_buffer.ohandle = -1;
672 }
673
674-bool dlt_is_log_in_multiple_files_active()
675+bool dlt_is_log_in_multiple_files_active(void)
676 {
677 return multiple_files_ring_buffer.ohandle > -1;
678 }
679--- a/src/system/dlt-system-journal.c
680+++ b/src/system/dlt-system-journal.c
681@@ -73,7 +73,7 @@ typedef struct
682 DLT_IMPORT_CONTEXT(dltsystem)
683 DLT_DECLARE_CONTEXT(journalContext)
684
685-int journal_checkUserBufferForFreeSpace()
686+int journal_checkUserBufferForFreeSpace(void)
687 {
688 int total_size, used_size;
689
690@@ -87,7 +87,7 @@ int journal_checkUserBufferForFreeSpace(
691
692 int dlt_system_journal_get(sd_journal *j, char *target, const char *field, size_t max_size)
693 {
694- char *data;
695+ const char *data;
696 size_t length;
697 int error_code;
698 size_t field_size;
699@@ -100,7 +100,9 @@ int dlt_system_journal_get(sd_journal *j
700 target[0] = 0;
701
702 /* get data from journal */
703- error_code = sd_journal_get_data(j, field, (const void **)&data, &length);
704+ const void *tmp;
705+ error_code = sd_journal_get_data(j, field, &tmp, &length);
706+ data = (const char *)tmp;
707
708 /* check if an error */
709 if (error_code)
710--- a/src/system/dlt-system-process-handling.c
711+++ b/src/system/dlt-system-process-handling.c
712@@ -72,7 +72,7 @@ volatile uint8_t quit = 0;
713 extern s_ft_inotify ino;
714 #endif
715
716-int daemonize()
717+int daemonize(void)
718 {
719 DLT_LOG(dltsystem, DLT_LOG_DEBUG,
720 DLT_STRING("dlt-system-process-handling, daemonize"));
721--- a/src/system/dlt-system-shell.c
722+++ b/src/system/dlt-system-shell.c
723@@ -112,7 +112,7 @@ int dlt_shell_injection_callback(uint32_
724 return 0;
725 }
726
727-void init_shell()
728+void init_shell(void)
729 {
730 DLT_LOG(dltsystem, DLT_LOG_DEBUG,
731 DLT_STRING("dlt-system-shell, register callback"));
732--- a/src/system/dlt-system.h
733+++ b/src/system/dlt-system.h
734@@ -193,8 +193,8 @@ int read_configuration_file(DltSystemCon
735 void cleanup_config(DltSystemConfiguration *config, DltSystemCliOptions *options);
736
737 /* For dlt-process-handling.c */
738-int daemonize();
739-void init_shell();
740+int daemonize(void);
741+void init_shell(void);
742 void dlt_system_signal_handler(int sig);
743
744 /* Main function for creating/registering all needed file descriptors and starting the poll for all of them. */
745--- a/src/tests/dlt-test-client-v2.c
746+++ b/src/tests/dlt-test-client-v2.c
747@@ -125,7 +125,7 @@ typedef struct
748 /**
749 * Print usage information of tool.
750 */
751-void usage()
752+void usage(void)
753 {
754 char version[255];
755
756--- a/src/tests/dlt-test-fork-handler-v2.c
757+++ b/src/tests/dlt-test-fork-handler-v2.c
758@@ -91,7 +91,7 @@ void dlt_log_message(DltContext *context
759 /**
760 * @brief sample code for using at_fork-handler
761 */
762-int main()
763+int main(void)
764 {
765 DltContext mainContext;
766 struct timespec timeout, r;
767--- a/src/tests/dlt-test-fork-handler.c
768+++ b/src/tests/dlt-test-fork-handler.c
769@@ -49,7 +49,7 @@ void dlt_log_message(DltContext *context
770 /**
771 * @brief sample code for using at_fork-handler
772 */
773-int main()
774+int main(void)
775 {
776 DltContext mainContext;
777 struct timespec timeout, r;
778--- a/src/tests/dlt-test-multi-process-v2.c
779+++ b/src/tests/dlt-test-multi-process-v2.c
780@@ -112,11 +112,11 @@ typedef struct {
781 /* Forward declarations */
782 void init_params(s_parameters *params);
783 void quit_handler(int signum);
784-void cleanup();
785+void cleanup(void);
786 void do_forks(s_parameters params);
787 void run_threads(s_parameters params);
788 void *do_logging(void *data);
789-int wait_for_death();
790+int wait_for_death(void);
791
792 /* State information */
793 volatile sig_atomic_t in_handler = 0;
794@@ -323,7 +323,7 @@ void quit_handler(int signum)
795 /**
796 * Ask the child processes to die
797 */
798-void cleanup()
799+void cleanup(void)
800 {
801 unsigned int i;
802
803@@ -458,7 +458,7 @@ void run_threads(s_parameters params)
804 /**
805 * Wait for child processes to complete their work.
806 */
807-int wait_for_death()
808+int wait_for_death(void)
809 {
810 int pids_left = (int) pidcount;
811
812--- a/src/tests/dlt-test-multi-process.c
813+++ b/src/tests/dlt-test-multi-process.c
814@@ -89,11 +89,11 @@ typedef struct {
815 /* Forward declarations */
816 void init_params(s_parameters *params);
817 void quit_handler(int signum);
818-void cleanup();
819+void cleanup(void);
820 void do_forks(s_parameters params);
821 void run_threads(s_parameters params);
822 void *do_logging(void *arg);
823-int wait_for_death();
824+int wait_for_death(void);
825
826 /* State information */
827 volatile sig_atomic_t in_handler = 0;
828@@ -300,7 +300,7 @@ void quit_handler(int signum)
829 /**
830 * Ask the child processes to die
831 */
832-void cleanup()
833+void cleanup(void)
834 {
835 unsigned int i;
836
837@@ -435,7 +435,7 @@ void run_threads(s_parameters params)
838 /**
839 * Wait for child processes to complete their work.
840 */
841-int wait_for_death()
842+int wait_for_death(void)
843 {
844 int pids_left = (int) pidcount;
845
846--- a/src/tests/dlt-test-non-verbose.c
847+++ b/src/tests/dlt-test-non-verbose.c
848@@ -58,7 +58,7 @@ DltContextData context_data;
849
850 void dlt_user_log_level_changed_callback(char context_id[DLT_ID_SIZE],uint8_t log_level,uint8_t trace_status);
851
852-void usage()
853+void usage(void)
854 {
855 char version[DLT_COMMON_BUFFER_LENGTH];
856
857@@ -84,7 +84,7 @@ void usage()
858 /******************/
859 /* The test cases */
860 /******************/
861-int test_logstorage()
862+int test_logstorage(void)
863 {
864 int delay = LOG_DELAY;
865 int i;
866--- a/src/tests/dlt-test-preregister-context-v2.c
867+++ b/src/tests/dlt-test-preregister-context-v2.c
868@@ -72,7 +72,7 @@
869 /**
870 * @brief sample code for using pre-registered contexts
871 */
872-int main()
873+int main(void)
874 {
875 DltContext mainContext;
876 struct timespec ts;
877--- a/src/tests/dlt-test-preregister-context.c
878+++ b/src/tests/dlt-test-preregister-context.c
879@@ -30,7 +30,7 @@
880 /**
881 * @brief sample code for using pre-registered contexts
882 */
883-int main()
884+int main(void)
885 {
886 DltContext mainContext;
887 struct timespec ts;
888--- a/src/tests/dlt-test-qnx-slogger.c
889+++ b/src/tests/dlt-test-qnx-slogger.c
890@@ -28,7 +28,7 @@
891 #define DELAY 500
892 #define LENGTH 100
893
894-void usage()
895+void usage(void)
896 {
897 char version[255];
898
899--- a/src/tests/dlt-test-stress-client-v2.c
900+++ b/src/tests/dlt-test-stress-client-v2.c
901@@ -127,7 +127,7 @@ typedef struct
902 /**
903 * Print usage information of tool.
904 */
905-void usage()
906+void usage(void)
907 {
908 char version[255];
909
910--- a/src/tests/dlt-test-stress-user-v2.c
911+++ b/src/tests/dlt-test-stress-user-v2.c
912@@ -86,7 +86,7 @@ DltContextData context_data;
913 /**
914 * Print usage information of tool.
915 */
916-void usage()
917+void usage(void)
918 {
919 char version[255];
920
921--- a/src/tests/dlt-test-stress-v2.c
922+++ b/src/tests/dlt-test-stress-v2.c
923@@ -104,7 +104,7 @@ char *env_manual_interruption = 0;
924 /**
925 * Print usage information of tool.
926 */
927-void usage()
928+void usage(void)
929 {
930 char version[255];
931
932--- a/src/tests/dlt-test-stress.c
933+++ b/src/tests/dlt-test-stress.c
934@@ -105,7 +105,7 @@ char *env_manual_interruption = 0;
935 /**
936 * Print usage information of tool.
937 */
938-void usage()
939+void usage(void)
940 {
941 char version[255];
942
943--- a/src/tests/dlt-test-user-v2.c
944+++ b/src/tests/dlt-test-user-v2.c
945@@ -142,7 +142,7 @@ DltContextData context_data;
946 /**
947 * Print usage information of tool.
948 */
949-void usage()
950+void usage(void)
951 {
952 char version[255];
953
954--- a/src/tests/dlt-test-user.c
955+++ b/src/tests/dlt-test-user.c
956@@ -144,7 +144,7 @@ DltContextData context_data;
957 /**
958 * Print usage information of tool.
959 */
960-void usage()
961+void usage(void)
962 {
963 char version[255];
964
965--- a/tests/dlt_test_receiver.c
966+++ b/tests/dlt_test_receiver.c
967@@ -107,7 +107,7 @@ int result = 0;
968 /**
969 * Print usage information of tool.
970 */
971-void usage()
972+void usage(void)
973 {
974 char version[255];
975
976--- a/src/shared/dlt_common.c
977+++ b/src/shared/dlt_common.c
978@@ -6108,7 +6108,7 @@ DltReturnValue dlt_message_argument_prin
979 return DLT_RETURN_OK;
980 }
981
982-void dlt_check_envvar()
983+void dlt_check_envvar(void)
984 {
985 char *env_log_filename = getenv("DLT_LOG_FILENAME");
986
987--- a/src/system/dlt-system-filetransfer.c
988+++ b/src/system/dlt-system-filetransfer.c
989@@ -724,10 +724,14 @@ int process_files(FiletransferOptions co
990 }
991
992 char *tosend = malloc(length);
993+#ifndef __clang__
994 #pragma GCC diagnostic push
995 #pragma GCC diagnostic ignored "-Wformat-truncation="
996+#endif
997 snprintf(tosend, length, "%s/%s", opts->Directory[j], ie->name);
998+#ifndef __clang__
999 #pragma GCC diagnostic pop
1000+#endif
1001 send_one(tosend, opts, j);
1002 free(tosend);
1003 }
diff --git a/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/char_conversion.patch b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/char_conversion.patch
new file mode 100644
index 0000000000..8d943b9764
--- /dev/null
+++ b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/char_conversion.patch
@@ -0,0 +1,27 @@
1daemon: fix sign-conversion warning in dlt_timer_conn_types array type
2
3Change dlt_timer_conn_types from char[] to DltConnectionType[] to match
4the actual type of values stored in the array.
5
6This was silently working on arm64 because char is unsigned by default on
7that architecture, making it compatible with DltConnectionType (an unsigned
8enum). On x86_64, char is signed by default, causing an implicit signed-to-
9unsigned conversion when passing array elements to dlt_connection_create(),
10which triggered -Wsign-conversion and broke the build.
11
12The fix corrects the array's declared type to match its contents, making the
13code portable regardless of the platform's char signedness.
14
15Upstream-Status: Pending
16Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
17--- a/src/daemon/dlt-daemon.c
18+++ b/src/daemon/dlt-daemon.c
19@@ -140,7 +140,7 @@ int g_signo = 0;
20 /* used for value from conf file */
21 static int value_length = 1024;
22
23-static char dlt_timer_conn_types[DLT_TIMER_UNKNOWN + 1] = {
24+static DltConnectionType dlt_timer_conn_types[DLT_TIMER_UNKNOWN + 1] = {
25 [DLT_TIMER_PACKET] = DLT_CONNECTION_ONE_S_TIMER,
26 [DLT_TIMER_ECU] = DLT_CONNECTION_SIXTY_S_TIMER,
27 #ifdef DLT_SYSTEMD_WATCHDOG_ENABLE
diff --git a/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_3.0.0.bb b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_3.0.0.bb
index 5e80acd67e..6de62c2a3d 100644
--- a/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_3.0.0.bb
+++ b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_3.0.0.bb
@@ -22,6 +22,10 @@ SRC_URI = "git://github.com/COVESA/${BPN}.git;protocol=https;branch=master \
22 file://0001-Fix-build-failures.patch \ 22 file://0001-Fix-build-failures.patch \
23 file://0001-fix-build-failure-when-systemd-is-enabled.patch \ 23 file://0001-fix-build-failure-when-systemd-is-enabled.patch \
24 file://0001-Fix-build-failure-with-glibc-2.43.patch \ 24 file://0001-Fix-build-failure-with-glibc-2.43.patch \
25 file://0001-CMakeLists.txt-make-CONFIGURATION_FILES_DIR-aligned.patch \
26 file://0001-warnings-Fix-clang-generated-warnings.patch \
27 file://0001-dlt-daemon.c-fix-wrong-len.patch \
28 file://char_conversion.patch \
25 " 29 "
26SRCREV = "f595ea29d1007ca1c3b2d1fd3a88adf7d3db6320" 30SRCREV = "f595ea29d1007ca1c3b2d1fd3a88adf7d3db6320"
27 31
@@ -53,7 +57,7 @@ inherit autotools gettext cmake pkgconfig systemd
53 57
54# -DWITH_DLT_COREDUMPHANDLER=ON this feature is too experimental, disable for now 58# -DWITH_DLT_COREDUMPHANDLER=ON this feature is too experimental, disable for now
55#FILES:${PN} += "${libdir}/sysctl.d" 59#FILES:${PN} += "${libdir}/sysctl.d"
56EXTRA_OECMAKE += "-DWITH_DLT_LOGSTORAGE_GZIP=ON -DWITH_EXTENDED_FILTERING=ON -DSYSTEMD_UNITDIR=${systemd_system_unitdir}" 60EXTRA_OECMAKE += "-DWITH_DLT_LOGSTORAGE_GZIP=ON -DWITH_EXTENDED_FILTERING=ON -DSYSTEMD_UNITDIR=${systemd_system_unitdir} -DWITH_DLT_USE_IPv6=OFF"
57 61
58PACKAGES += "${PN}-systemd" 62PACKAGES += "${PN}-systemd"
59SYSTEMD_PACKAGES = "${PN} ${PN}-systemd" 63SYSTEMD_PACKAGES = "${PN} ${PN}-systemd"
@@ -72,5 +76,7 @@ FILES:${PN}-doc += "${datadir}/dlt-filetransfer"
72 76
73do_install:append() { 77do_install:append() {
74 rm -f ${D}${bindir}/dlt-test-* 78 rm -f ${D}${bindir}/dlt-test-*
75 sed -i -e 's:${RECIPE_SYSROOT}::g' ${D}/usr/lib/pkgconfig/automotive-dlt.pc 79 if [ -f ${D}${libdir}/pkgconfig/automotive-dlt.pc ]; then
80 sed -i -e 's:${RECIPE_SYSROOT}::g' ${D}${libdir}/pkgconfig/automotive-dlt.pc
81 fi
76} 82}