* [Buildroot] [PATCH] package/dump1090: fix build w/ gcc-15
@ 2025-08-21 11:48 Peter Korsgaard
2025-08-22 20:13 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Peter Korsgaard @ 2025-08-21 11:48 UTC (permalink / raw)
To: buildroot
Fixes https://autobuild.buildroot.org/results/dbf55d0fd8d779f408e7ccca4c2a9083e7a11f6a/
GCC-15 has gained a new warning about non-NUL terminated strings and
dump1090 is built with -Werror leading to build errors like:
interactive.c:143:23: error: initializer-string for array of 'char' truncates
NUL terminator but destination lacks 'nonstring' attribute (5 chars into 4
available) [-Werror=unterminated-string-initialization]
143 | char spinner[4] = "|/-\\";
Add a patch from an upstream pull request to fix this by zero terminating
the strings.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
.../0002-Fix-compilation-with-GCC15.patch | 50 +++++++++++++++++++
1 file changed, 50 insertions(+)
create mode 100644 package/dump1090/0002-Fix-compilation-with-GCC15.patch
diff --git a/package/dump1090/0002-Fix-compilation-with-GCC15.patch b/package/dump1090/0002-Fix-compilation-with-GCC15.patch
new file mode 100644
index 0000000000..6361dbc907
--- /dev/null
+++ b/package/dump1090/0002-Fix-compilation-with-GCC15.patch
@@ -0,0 +1,50 @@
+From 93be1da123215e8ac15a0deaffedd480e8899f77 Mon Sep 17 00:00:00 2001
+From: Conrad Kostecki <conrad@kostecki.com>
+Date: Tue, 22 Apr 2025 00:41:31 +0200
+Subject: [PATCH] Fix compilation with GCC15
+
+Upstream: https://github.com/flightaware/dump1090/pull/261
+Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
+---
+ ais_charset.c | 2 +-
+ ais_charset.h | 2 +-
+ interactive.c | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/ais_charset.c b/ais_charset.c
+index a487e3c..0d3af03 100644
+--- a/ais_charset.c
++++ b/ais_charset.c
+@@ -1,3 +1,3 @@
+ #include "ais_charset.h"
+
+-char ais_charset[64] = "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_ !\"#$%&'()*+,-./0123456789:;<=>?";
++char ais_charset[65] = "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_ !\"#$%&'()*+,-./0123456789:;<=>?";
+diff --git a/ais_charset.h b/ais_charset.h
+index 93d4a72..95ef373 100644
+--- a/ais_charset.h
++++ b/ais_charset.h
+@@ -1,6 +1,6 @@
+ #ifndef AIS_CHARSET_H
+ #define AIS_CHARSET_H
+
+-extern char ais_charset[64];
++extern char ais_charset[65];
+
+ #endif
+diff --git a/interactive.c b/interactive.c
+index 8761c95..75775ad 100644
+--- a/interactive.c
++++ b/interactive.c
+@@ -140,7 +140,7 @@ void interactiveShowData(void) {
+ static bool need_clear = true;
+ uint64_t now = mstime();
+ char progress;
+- char spinner[4] = "|/-\\";
++ char spinner[5] = "|/-\\";
+ int valid = 0;
+ double signalMax = -100.0;
+ double signalMin = +100.0;
+--
+2.39.5
+
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH] package/dump1090: fix build w/ gcc-15
2025-08-21 11:48 [Buildroot] [PATCH] package/dump1090: fix build w/ gcc-15 Peter Korsgaard
@ 2025-08-22 20:13 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-08-22 20:13 UTC (permalink / raw)
To: Peter Korsgaard; +Cc: buildroot
On Thu, 21 Aug 2025 13:48:00 +0200
Peter Korsgaard <peter@korsgaard.com> wrote:
> Fixes https://autobuild.buildroot.org/results/dbf55d0fd8d779f408e7ccca4c2a9083e7a11f6a/
>
> GCC-15 has gained a new warning about non-NUL terminated strings and
> dump1090 is built with -Werror leading to build errors like:
>
> interactive.c:143:23: error: initializer-string for array of 'char' truncates
> NUL terminator but destination lacks 'nonstring' attribute (5 chars into 4
> available) [-Werror=unterminated-string-initialization]
> 143 | char spinner[4] = "|/-\\";
>
> Add a patch from an upstream pull request to fix this by zero terminating
> the strings.
>
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
> ---
> .../0002-Fix-compilation-with-GCC15.patch | 50 +++++++++++++++++++
> 1 file changed, 50 insertions(+)
> create mode 100644 package/dump1090/0002-Fix-compilation-with-GCC15.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-22 20:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-21 11:48 [Buildroot] [PATCH] package/dump1090: fix build w/ gcc-15 Peter Korsgaard
2025-08-22 20:13 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox