Skip to content

Conversation

@Vaeterchen-Host
Copy link

@Vaeterchen-Host Vaeterchen-Host commented Nov 28, 2025

This PR fixes two build-breaking issues introduced by newer GCC versions when building dump1090-fa from source.

GCC now treats several warnings as errors (due to -Werror), which causes dump1090-fa to fail compilation because two string initializers do not fit into their declared char arrays. As a result, several AUR users and downstream packagers cannot currently build this project.

What this PR fixes

1. interactive.c

char spinner[4] = "|/-";

Copy code
The initializer string is 5 bytes long (4 chars + '\0') but the array has size 4.

→ Replaced with:
char spinner[] = "|/-";

Copy code

2. ais_charset.c / ais_charset.h

char ais_charset[64] = "@abcdefghijklmnopqrstuvwxyz[]^_ !"#$%&'()*+,-./0123456789:;<=>?";

Copy code
The initializer string contains 65 characters plus the NUL terminator but the array allows only 64.

The header also declares:
extern char ais_charset[64];

Copy code

→ Both updated to:
char ais_charset[] = "...";
extern char ais_charset[];

Copy code

✔️ Result

• All build failures are resolved
• GCC no longer raises unterminated-string-initialization errors
• No functional behavior changes
• No changes required in other parts of the code
• Compatible with all current GCC versions

Why this matters

Dump1090-fa currently fails to build on modern Linux distros (Arch, Debian testing, etc.) due to these strict Werror failures. This PR ensures the project continues to compile cleanly.

Let me know if you want me to squash commits or adjust the patch.

@toomyem
Copy link

toomyem commented Nov 29, 2025

It is similar to #261.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants