Rusty Russell
f40ff1d079
lightningd: fix compilation for older compilers.
gcc 9.3.0-10 (Ubunto Focal):
```
cc lightningd/offer.c
In file included from ccan/ccan/cast/cast.h:6,
from lightningd/offer.c:2:
lightningd/offer.c: In function 'json_createoffer':
ccan/ccan/cast/cast.h:115:13: error: dereferencing pointer to incomplete type 'struct json_escape'
115 | __typeof__(**(union { int z; __typeof__(expr) x; }){0}.x)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ccan/ccan/build_assert/build_assert.h:38:24: note: in definition of macro 'BUILD_ASSERT_OR_ZERO'
38 | (sizeof(char [1 - 2*!(cond)]) - 1)
| ^~~~
ccan/ccan/cast/cast.h:122:31: note: in expansion of macro 'cast_const_strip2'
122 | __builtin_types_compatible_p(cast_const_strip2(expr), \
| ^~~~~~~~~~~~~~~~~
ccan/ccan/cast/cast.h:59:35: note: in expansion of macro 'cast_const_compat2'
59 | (0 ? BUILD_ASSERT_OR_ZERO(cast_const_compat2((expr), type)) : \
| ^~~~~~~~~~~~~~~~~~
lightningd/offer.c:105:12: note: in expansion of macro 'cast_const2'
105 | cast_const2(const struct json_escape **,
| ^~~~~~~~~~~
ccan/ccan/cast/cast.h:115:13: error: dereferencing pointer to incomplete type 'const struct json_escape'
115 | __typeof__(**(union { int z; __typeof__(expr) x; }){0}.x)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ccan/ccan/build_assert/build_assert.h:38:24: note: in definition of macro 'BUILD_ASSERT_OR_ZERO'
38 | (sizeof(char [1 - 2*!(cond)]) - 1)
| ^~~~
ccan/ccan/cast/cast.h:123:10: note: in expansion of macro 'cast_const_strip2'
123 | cast_const_strip2(type))
| ^~~~~~~~~~~~~~~~~
ccan/ccan/cast/cast.h:59:35: note: in expansion of macro 'cast_const_compat2'
59 | (0 ? BUILD_ASSERT_OR_ZERO(cast_const_compat2((expr), type)) : \
| ^~~~~~~~~~~~~~~~~~
lightningd/offer.c:105:12: note: in expansion of macro 'cast_const2'
105 | cast_const2(const struct json_escape **,
| ^~~~~~~~~~~
make: *** [Makefile:320: lightningd/offer.o] Error 1
```
Reported-by: Shahana
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-10-24 16:23:37 +10:30
..
2025-10-24 11:30:17 +10:30
2025-10-23 06:44:04 +10:30
2025-10-24 11:30:17 +10:30
2025-10-23 06:44:04 +10:30
2025-10-24 11:30:17 +10:30
2025-10-24 11:30:17 +10:30
2025-10-24 11:30:17 +10:30
2025-05-15 16:40:33 +09:30
2025-10-23 06:44:04 +10:30
2025-05-15 16:40:33 +09:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-04-29 13:31:23 +09:30
2025-10-23 06:44:04 +10:30
2024-11-25 20:23:21 +10:30
2025-10-23 06:44:04 +10:30
2025-08-19 13:37:50 +09:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2024-11-25 15:39:13 +10:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-08-14 18:57:05 +09:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-10-24 11:28:57 +10:30
2025-08-18 10:01:07 +09:30
2025-10-24 11:30:17 +10:30
2025-08-19 13:37:50 +09:30
2025-10-23 06:44:04 +10:30
2024-12-16 09:48:51 +10:30
2025-10-23 06:44:04 +10:30
2025-10-24 11:30:17 +10:30
2025-10-23 06:44:04 +10:30
2025-10-01 12:12:56 +09:30
2025-10-24 16:23:37 +10:30
2025-10-24 11:30:17 +10:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-03-12 09:26:08 +10:30
2025-10-23 06:44:04 +10:30
2024-10-27 13:57:50 +11:00
2025-10-24 11:30:17 +10:30
2025-10-24 11:30:17 +10:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-08-14 18:57:05 +09:30
2025-10-23 06:44:04 +10:30
2025-08-14 17:35:39 +09:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-10-24 11:30:17 +10:30
2025-10-24 11:28:57 +10:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-10-23 06:44:04 +10:30
2025-10-13 14:15:32 +10:30
2025-10-13 14:15:32 +10:30
2025-01-21 09:18:25 +10:30
2025-01-21 09:18:25 +10:30