mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-23 15:54:21 -09:00
package/xenomai: fix build with gcc 11
The commit adds an upstream patch to fix the following build failure:
latency.c: In function 'dump_histo_gnuplot':
latency.c:415:9: error: 'fclose' called on pointer returned from a mismatched allocation function [-Werror=mismatched-dealloc]
415 | fclose(ifp);
| ^~~~~~~~~~~
latency.c:404:15: note: returned from 'popen'
404 | ifp = popen(xconf, "r");
| ^~~~~~~~~~~~~~~~~
Fixes:
- http://autobuild.buildroot.org/results/e15ccef2f2bd58482204b5061f77e76a8a540ebd
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 17642f5032)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
committed by
Peter Korsgaard
parent
e5b4c7980d
commit
82fbd44f3f
@@ -0,0 +1,30 @@
|
||||
From 6fe6b75bef4b4bb9723b12f0e9ebfd9877e00a44 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kiszka <jan.kiszka@siemens.com>
|
||||
Date: Sat, 16 Oct 2021 19:52:28 +0200
|
||||
Subject: [PATCH] testsuite/latency: Use corresponding pclose for popen
|
||||
|
||||
Was found by latest gcc-11 and -Werror=mismatched-dealloc.
|
||||
|
||||
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
|
||||
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
|
||||
Upstream: https://source.denx.de/Xenomai/xenomai/-/commit/6fe6b75bef4b4bb9723b12f0e9ebfd9877e00a44
|
||||
---
|
||||
testsuite/latency/latency.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/testsuite/latency/latency.c b/testsuite/latency/latency.c
|
||||
index a0e6f4826084..6cd3a28b44f6 100644
|
||||
--- a/testsuite/latency/latency.c
|
||||
+++ b/testsuite/latency/latency.c
|
||||
@@ -412,7 +412,7 @@ static void dump_histo_gnuplot(int32_t *histogram, time_t duration)
|
||||
fputs(buf, ofp);
|
||||
}
|
||||
|
||||
- fclose(ifp);
|
||||
+ pclose(ifp);
|
||||
|
||||
dump_data:
|
||||
for (n = 0; n < histogram_size && histogram[n] == 0; n++)
|
||||
--
|
||||
2.43.0
|
||||
|
||||
Reference in New Issue
Block a user