mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
Fix build fail on 32bit environment.
cc -DBINTOPKGLIBEXECDIR="\"../libexec/c-lightning\"" -Wall -Wundef -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wold-style-definition -Werror -Wno-error=maybe-uninitialized -std=gnu11 -g -fstack-protector -Og -I ccan -I external/libwally-core/include/ -I external/libwally-core/src/secp256k1/include/ -I external/jsmn/ -I external/libbacktrace/ -I external/libbacktrace-build -I . -I/usr/local/include -DSHACHAIN_BITS=48 -DJSMN_PARENT_LINKS -DCOMPAT_V052=1 -DCOMPAT_V060=1 -DCOMPAT_V061=1 -DCOMPAT_V062=1 -DCOMPAT_V070=1 -DBINTOPKGLIBEXECDIR="\"../libexec/c-lightning\"" -c -o common/sphinx.o common/sphinx.c
common/sphinx.c: In function 'sphinx_parse_payload':
common/sphinx.c:488:30: error: passing argument 3 of 'varint_get' from incompatible pointer type [-Werror=incompatible-pointer-types]
vsize = varint_get(src, 3, &raw_size);
^
In file included from common/sphinx.c:3:0:
./bitcoin/varint.h:16:8: note: expected 'u64 * {aka long long unsigned int *}' but argument is of type 'size_t * {aka unsigned int *}'
size_t varint_get(const u8 *p, size_t max_len, varint_t *val);
^~~~~~~~~~
common/sphinx.c: In function 'process_onionpacket':
common/sphinx.c:621:40: error: passing argument 3 of 'bigsize_get' from incompatible pointer type [-Werror=incompatible-pointer-types]
vsize = bigsize_get(paddedheader, 3, &shift_size);
^
In file included from common/sphinx.c:3:0:
./bitcoin/varint.h:23:8: note: expected 'u64 * {aka long long unsigned int *}' but argument is of type 'size_t * {aka unsigned int *}'
size_t bigsize_get(const u8 *p, size_t max, varint_t *val);
This commit is contained in:
committed by
Rusty Russell
parent
488ef67b9b
commit
b7119150a7
@@ -470,7 +470,8 @@ static bool sphinx_write_frame(u8 *dest, const struct sphinx_hop *hop)
|
||||
|
||||
static void sphinx_parse_payload(struct route_step *step, const u8 *src)
|
||||
{
|
||||
size_t hop_size, raw_size, vsize;
|
||||
size_t hop_size, vsize;
|
||||
varint_t raw_size;
|
||||
#if !EXPERIMENTAL_FEATURES
|
||||
if (src[0] != 0x00) {
|
||||
step->type = SPHINX_INVALID_PAYLOAD;
|
||||
@@ -586,7 +587,8 @@ struct route_step *process_onionpacket(
|
||||
u8 blind[BLINDING_FACTOR_SIZE];
|
||||
u8 stream[NUM_STREAM_BYTES];
|
||||
u8 paddedheader[2*ROUTING_INFO_SIZE];
|
||||
size_t shift_size, vsize;
|
||||
size_t vsize;
|
||||
varint_t shift_size;
|
||||
|
||||
step->next = talz(step, struct onionpacket);
|
||||
step->next->version = msg->version;
|
||||
|
||||
Reference in New Issue
Block a user