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

ccan: update for newer compiler fixes.

Public commit record

What the developer wrote

Authored by Rusty Russell

73/100 · Adequate
ccan: update for newer compiler fixes.

Two more commits, which fix warnings:

```
In file included from ccan/ccan/strmap/strmap.h:5,
from ./common/memleak.h:4,
from lightningd/channel_gossip.c:5:
lightningd/channel_gossip.c: In function ‘broadcast_new_gossip’:
ccan/ccan/build_assert/build_assert.h:56:17: error: anonymous struct declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
56 | (sizeof(struct { _Static_assert(cond, "BUILD_ASSERT_OR_ZERO"); char c; }) - 1)
| ^~~~~~
ccan/ccan/typesafe_cb/typesafe_cb.h:35:46: note: in definition of macro ‘typesafe_cb_cast’
35 | oktype), \
| ^~~~~~
./lightningd/subd.h:184:19: note: in expansion of macro ‘typesafe_cb_preargs’
184 | typesafe_cb_preargs(void, void *, \
| ^~~~~~~~~~~~~~~~~~~
lightningd/channel_gossip.c:415:9: note: in expansion of macro ‘subd_req’
415 | subd_req(ld->gossip, ld->gossip,
| ^~~~~~~~
ccan/ccan/cast/cast.h:47:14: note: in expansion of macro ‘BUILD_ASSERT_OR_ZERO’
47 | (0 ? BUILD_ASSERT_OR_ZERO(cast_const_compat1((expr), type)) : \
| ^~~~~~~~~~~~~~~~~~~~
lightningd/channel_gossip.c:417:42: note: in expansion of macro ‘cast_const’
417 | -1, 0, addgossip_reply, cast_const(char *, desc));
| ^~~~~~~~~~
cc1: all warnings being treated as errors
```

And

```
ccan/ccan/cdump/cdump.c: In function ‘tok_take_conglom’:
ccan/ccan/cdump/cdump.c:272:35: error: ‘%.*s’ directive argument is null [-Werror=format-overflow=]
272 | "Line %u: '%.*s': %s\n",
| ^~~~
cc1: all warnings being treated as errors
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This commit updates two internal helper files in the CCAN library to silence compiler warnings when building with newer GCC versions. One change swaps an anonymous struct for an anonymous union inside a compile-time size check, because GCC 13 objects to anonymous structs in certain macro expansions. The other avoids passing a NULL pointer into a printf-style error message. There is no indication these changes fix a runtime security bug; they are build-hygiene fixes.

Recommended action

No security action required; treat as normal build-compatibility maintenance.

Security signals we found

01

No security-relevant signal in commit message or diff

02

Changes are compiler warning fixes, not vulnerability fixes

03

No mention of CVE, security bug, researcher credit, or exploit

Risk score

Why this scored 14/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 9/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.