AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

common/wireaddr: fix GCC 15 const-qualifier errors

Public commit record

What the developer wrote

Authored by Vincenzo Palazzo

81/100 · Strong
common/wireaddr: fix GCC 15 const-qualifier errors

GCC 15 propagates the const qualifier through strchr/strrchr, so the
result of strchr(const char *, c) is const char *. Declaring the locals
as char * triggers -Werror=discarded-qualifiers:

common/wireaddr.c: In function 'separate_address_and_port':
common/wireaddr.c:297:29: error: initialization discards 'const'
qualifier from pointer target type [-Werror=discarded-qualifiers]
common/wireaddr.c:304:27: error: assignment discards 'const'
qualifier from pointer target type [-Werror=discarded-qualifiers]

Make portcolon and end const char * to match; both are only read.

Fixes: https://github.com/ElementsProject/lightning/issues/9074
Changelog-Fixed: build: fix build errors with GCC 15 (Arch Linux).
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This is a minor build-compatibility fix for the GCC 15 compiler. It changes two local variables from `char *` to `const char *` so the code compiles cleanly with newer, stricter compiler warnings. There is no functional change and no security impact.

Recommended action

No security action needed. Treat as a normal build-fix commit.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.