File: 810.patch

package info (click to toggle)
dlt-daemon 3.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 7,296 kB
  • sloc: ansic: 58,041; cpp: 16,199; sh: 1,769; xml: 1,440; python: 376; makefile: 31
file content (183 lines) | stat: -rw-r--r-- 5,290 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
From 7fe4faf684056f9578fdfac73af93b7c3a60bbff Mon Sep 17 00:00:00 2001
From: Gianfranco Costamagna <locutusofborg@debian.org>
Date: Tue, 6 Jan 2026 12:52:43 +0100
Subject: [PATCH 1/3] Fix pedantic gcc error about double ending ";"

---
 doc/dlt_for_developers.md    | 14 +++++++-------
 examples/example1/example1.c |  2 +-
 examples/example2/example2.c |  2 +-
 examples/example3/example3.c |  2 +-
 examples/example4/example4.c |  2 +-
 src/kpi/dlt-kpi.c            |  2 +-
 6 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/doc/dlt_for_developers.md b/doc/dlt_for_developers.md
index ddf5eb563..a9634f459 100644
--- a/doc/dlt_for_developers.md
+++ b/doc/dlt_for_developers.md
@@ -30,7 +30,7 @@ this document.
 ```
 #include <dlt/dlt.h>
 
-DLT_DECLARE_CONTEXT(ctx); /* declare context */
+DLT_DECLARE_CONTEXT(ctx) /* declare context */
 
 int main()
 {
@@ -531,18 +531,18 @@ declared once. Therefore a unique variable name for each context has to be
 used.
 
 ```
-DLT_DECLARE_CONTEXT(myContext1);
-DLT_DECLARE_CONTEXT(myContext2);
-DLT_DECLARE_CONTEXT(myContext3);
+DLT_DECLARE_CONTEXT(myContext1)
+DLT_DECLARE_CONTEXT(myContext2)
+DLT_DECLARE_CONTEXT(myContext3)
 ```
 
 If contexts from another C or CPP file shall be used, these contexts can be
 imported by calling:
 
 ```
-DLT_IMPORT_CONTEXT(myContext1);
-DLT_IMPORT_CONTEXT(myContext2);
-DLT_IMPORT_CONTEXT(myContext3);
+DLT_IMPORT_CONTEXT(myContext1)
+DLT_IMPORT_CONTEXT(myContext2)
+DLT_IMPORT_CONTEXT(myContext3)
 ```
 
 After the application is registered and contexts are declared, contexts need to
diff --git a/examples/example1/example1.c b/examples/example1/example1.c
index c1340ef83..894915cf1 100644
--- a/examples/example1/example1.c
+++ b/examples/example1/example1.c
@@ -48,7 +48,7 @@
 
 #include <dlt.h>
 
-DLT_DECLARE_CONTEXT(con_exa1);
+DLT_DECLARE_CONTEXT(con_exa1)
 
 int main()
 {
diff --git a/examples/example2/example2.c b/examples/example2/example2.c
index 6069b0d5c..c03630e62 100644
--- a/examples/example2/example2.c
+++ b/examples/example2/example2.c
@@ -50,7 +50,7 @@
 
 #include "dlt_id.h"
 
-DLT_DECLARE_CONTEXT(con_exa2);
+DLT_DECLARE_CONTEXT(con_exa2)
 
 int main()
 {
diff --git a/examples/example3/example3.c b/examples/example3/example3.c
index f8b918ef6..426233e12 100644
--- a/examples/example3/example3.c
+++ b/examples/example3/example3.c
@@ -50,7 +50,7 @@
 
 #include "dlt_id.h"
 
-DLT_DECLARE_CONTEXT(con_exa3);
+DLT_DECLARE_CONTEXT(con_exa3)
 
 int main()
 {
diff --git a/examples/example4/example4.c b/examples/example4/example4.c
index 99c42679f..412a80bb0 100644
--- a/examples/example4/example4.c
+++ b/examples/example4/example4.c
@@ -48,7 +48,7 @@
 
 #include <dlt.h>
 
-DLT_DECLARE_CONTEXT(con_exa1);
+DLT_DECLARE_CONTEXT(con_exa1)
 
 int main()
 {
diff --git a/src/kpi/dlt-kpi.c b/src/kpi/dlt-kpi.c
index 2ac32bfa4..84dfee28e 100644
--- a/src/kpi/dlt-kpi.c
+++ b/src/kpi/dlt-kpi.c
@@ -30,7 +30,7 @@
 #include <unistd.h>
 #include <pthread.h>
 
-DLT_DECLARE_CONTEXT(kpi_ctx);
+DLT_DECLARE_CONTEXT(kpi_ctx)
 
 DltKpiConfig config;
 

From e190bfc0571385742cad3dd59ea12d822906ea4b Mon Sep 17 00:00:00 2001
From: Gianfranco Costamagna <locutusofborg@debian.org>
Date: Tue, 6 Jan 2026 12:53:20 +0100
Subject: [PATCH 2/3] Fix unused curr_time variable with systemd enabled

---
 src/daemon/dlt-daemon.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/daemon/dlt-daemon.c b/src/daemon/dlt-daemon.c
index 97af1cd96..4e3d4bff5 100644
--- a/src/daemon/dlt-daemon.c
+++ b/src/daemon/dlt-daemon.c
@@ -5509,9 +5509,6 @@ int dlt_daemon_send_ringbuffer_to_client(DltDaemon *daemon, DltDaemonLocal *daem
     int ret;
     static uint8_t data[DLT_DAEMON_RCVBUFSIZE];
     int length;
-#ifdef DLT_SYSTEMD_WATCHDOG_ENABLE
-    uint32_t curr_time = 0U;
-#endif
 
     PRINT_FUNCTION_VERBOSE(verbose);
 
@@ -5554,9 +5551,6 @@ int dlt_daemon_send_ringbuffer_to_client_v2(DltDaemon *daemon, DltDaemonLocal *d
     int ret;
     static uint8_t data[DLT_DAEMON_RCVBUFSIZE];
     int length;
-#ifdef DLT_SYSTEMD_WATCHDOG_ENABLE
-    uint32_t curr_time = 0U;
-#endif
 
     PRINT_FUNCTION_VERBOSE(verbose);
 

From c9baeeb9a9eb90c2926ab8b0d9c4d03da8919c3d Mon Sep 17 00:00:00 2001
From: Gianfranco Costamagna <locutusofborg@debian.org>
Date: Sat, 7 Feb 2026 23:26:43 +0100
Subject: [PATCH 3/3] Fix another issue with gtest and is_open missing return
 value check

---
 .../dlt-logd-converter/gtest_dlt_logd_converter.cpp          | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/components/dlt-logd-converter/gtest_dlt_logd_converter.cpp b/tests/components/dlt-logd-converter/gtest_dlt_logd_converter.cpp
index 8d6b27d61..ec2851003 100644
--- a/tests/components/dlt-logd-converter/gtest_dlt_logd_converter.cpp
+++ b/tests/components/dlt-logd-converter/gtest_dlt_logd_converter.cpp
@@ -66,7 +66,8 @@ string t_load_json_file()
     char *token;
     string pattern;
     string json_sequence;
-    file.is_open();
+    if(!file.is_open())
+        return "";
     while (!file.eof()) {
         getline(file, pattern);
         if (pattern.size() == 0) {
@@ -590,4 +591,4 @@ TEST(t_logd_parser_loop, normal)
 int main(int argc, char** argv) {
     ::testing::InitGoogleTest(&argc, argv);
     return RUN_ALL_TESTS();
-}
\ No newline at end of file
+}