* [Buildroot] [PATCH v2, 1/1] package/xenomai: fix build with gcc >= 12
@ 2023-12-03 14:54 Fabrice Fontaine
2023-12-03 16:27 ` Peter Korsgaard
2023-12-03 22:06 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2023-12-03 14:54 UTC (permalink / raw)
To: buildroot; +Cc: Romain Naour, Fabrice Fontaine, Thomas De Schampheleire
Fix the following build failure with gcc >= 12:
task.c: In function 't_start':
task.c:398:16: error: 'ret' may be used uninitialized [-Werror=maybe-uninitialized]
398 | return ret;
| ^~~
task.c:364:13: note: 'ret' was declared here
364 | int ret;
| ^~~
task.c: In function 't_resume':
task.c:444:16: error: 'ret' may be used uninitialized [-Werror=maybe-uninitialized]
444 | return ret;
| ^~~
task.c:428:13: note: 'ret' was declared here
428 | int ret;
| ^~~
Fixes:
- http://autobuild.buildroot.org/results/bc1b40de22e563b704ad7f20b6bf4d1f73a6ed8a
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Changes v1 -> v2:
- Add missing Upstream tag to patch
...ib-psos-task.c-fix-build-with-gcc-12.patch | 56 +++++++++++++++++++
1 file changed, 56 insertions(+)
create mode 100644 package/xenomai/3.0.10/0004-lib-psos-task.c-fix-build-with-gcc-12.patch
diff --git a/package/xenomai/3.0.10/0004-lib-psos-task.c-fix-build-with-gcc-12.patch b/package/xenomai/3.0.10/0004-lib-psos-task.c-fix-build-with-gcc-12.patch
new file mode 100644
index 0000000000..fcc1f1e673
--- /dev/null
+++ b/package/xenomai/3.0.10/0004-lib-psos-task.c-fix-build-with-gcc-12.patch
@@ -0,0 +1,56 @@
+From 6c6da9e6d75ccfaa83c1efe14211f080c14181c6 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sun, 3 Dec 2023 15:28:50 +0100
+Subject: [PATCH] lib/psos/task.c: fix build with gcc >= 12
+
+Fix the following build failure with gcc >= 12:
+
+task.c: In function 't_start':
+task.c:398:16: error: 'ret' may be used uninitialized [-Werror=maybe-uninitialized]
+ 398 | return ret;
+ | ^~~
+task.c:364:13: note: 'ret' was declared here
+ 364 | int ret;
+ | ^~~
+task.c: In function 't_resume':
+task.c:444:16: error: 'ret' may be used uninitialized [-Werror=maybe-uninitialized]
+ 444 | return ret;
+ | ^~~
+task.c:428:13: note: 'ret' was declared here
+ 428 | int ret;
+ | ^~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/bc1b40de22e563b704ad7f20b6bf4d1f73a6ed8a
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Upstream: https://lore.kernel.org/xenomai/20231203144307.1940139-1-fontaine.fabrice@gmail.com/T/#u
+---
+ lib/psos/task.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/psos/task.c b/lib/psos/task.c
+index f678be61d..27bcc28a9 100644
+--- a/lib/psos/task.c
++++ b/lib/psos/task.c
+@@ -362,7 +362,7 @@ u_long t_start(u_long tid,
+ {
+ struct psos_task *task;
+ struct service svc;
+- int ret;
++ int ret = SUCCESS;
+
+ CANCEL_DEFER(svc);
+
+@@ -426,7 +426,7 @@ u_long t_resume(u_long tid)
+ {
+ struct psos_task *task;
+ struct service svc;
+- int ret;
++ int ret = SUCCESS;
+
+ CANCEL_DEFER(svc);
+
+--
+2.42.0
+
--
2.42.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH v2, 1/1] package/xenomai: fix build with gcc >= 12
2023-12-03 14:54 [Buildroot] [PATCH v2, 1/1] package/xenomai: fix build with gcc >= 12 Fabrice Fontaine
@ 2023-12-03 16:27 ` Peter Korsgaard
2023-12-03 22:06 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2023-12-03 16:27 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Romain Naour, Thomas De Schampheleire, buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> Fix the following build failure with gcc >= 12:
> task.c: In function 't_start':
> task.c:398:16: error: 'ret' may be used uninitialized [-Werror=maybe-uninitialized]
> 398 | return ret;
> | ^~~
> task.c:364:13: note: 'ret' was declared here
> 364 | int ret;
> | ^~~
> task.c: In function 't_resume':
> task.c:444:16: error: 'ret' may be used uninitialized [-Werror=maybe-uninitialized]
> 444 | return ret;
> | ^~~
> task.c:428:13: note: 'ret' was declared here
> 428 | int ret;
> | ^~~
> Fixes:
> - http://autobuild.buildroot.org/results/bc1b40de22e563b704ad7f20b6bf4d1f73a6ed8a
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> Changes v1 -> v2:
> - Add missing Upstream tag to patch
Committed, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH v2, 1/1] package/xenomai: fix build with gcc >= 12
2023-12-03 14:54 [Buildroot] [PATCH v2, 1/1] package/xenomai: fix build with gcc >= 12 Fabrice Fontaine
2023-12-03 16:27 ` Peter Korsgaard
@ 2023-12-03 22:06 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2023-12-03 22:06 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Romain Naour, Thomas De Schampheleire, buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> Fix the following build failure with gcc >= 12:
> task.c: In function 't_start':
> task.c:398:16: error: 'ret' may be used uninitialized [-Werror=maybe-uninitialized]
> 398 | return ret;
> | ^~~
> task.c:364:13: note: 'ret' was declared here
> 364 | int ret;
> | ^~~
> task.c: In function 't_resume':
> task.c:444:16: error: 'ret' may be used uninitialized [-Werror=maybe-uninitialized]
> 444 | return ret;
> | ^~~
> task.c:428:13: note: 'ret' was declared here
> 428 | int ret;
> | ^~~
> Fixes:
> - http://autobuild.buildroot.org/results/bc1b40de22e563b704ad7f20b6bf4d1f73a6ed8a
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> Changes v1 -> v2:
> - Add missing Upstream tag to patch
Committed to 2023.02.x and 2023.08.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-12-03 22:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-03 14:54 [Buildroot] [PATCH v2, 1/1] package/xenomai: fix build with gcc >= 12 Fabrice Fontaine
2023-12-03 16:27 ` Peter Korsgaard
2023-12-03 22:06 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox