mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-18 22:54:25 +01:00
build: allow DEVELOPER builds with -Og and gcc 9.4.0
Removes some warnings. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -160,6 +160,8 @@ static const struct htlc **include_htlcs(struct channel *channel, enum side side
|
|||||||
sender = !side;
|
sender = !side;
|
||||||
msatoshi = AMOUNT_MSAT(4000000);
|
msatoshi = AMOUNT_MSAT(4000000);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
abort();
|
||||||
}
|
}
|
||||||
assert(msatoshi.millisatoshis != 0);
|
assert(msatoshi.millisatoshis != 0);
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,10 @@ char *billboard_message(const tal_t *ctx,
|
|||||||
depth_togo);
|
depth_togo);
|
||||||
else if (channel_ready[LOCAL] && !channel_ready[REMOTE])
|
else if (channel_ready[LOCAL] && !channel_ready[REMOTE])
|
||||||
funding_status = "We've confirmed channel ready, they haven't yet.";
|
funding_status = "We've confirmed channel ready, they haven't yet.";
|
||||||
else if (!channel_ready[LOCAL] && channel_ready[REMOTE])
|
else {
|
||||||
|
assert(!channel_ready[LOCAL] && channel_ready[REMOTE]);
|
||||||
funding_status = "They've confirmed channel ready, we haven't yet.";
|
funding_status = "They've confirmed channel ready, we haven't yet.";
|
||||||
|
}
|
||||||
|
|
||||||
if (have_sigs) {
|
if (have_sigs) {
|
||||||
if (have_sigs[LOCAL] && have_sigs[REMOTE])
|
if (have_sigs[LOCAL] && have_sigs[REMOTE])
|
||||||
@@ -34,8 +36,10 @@ char *billboard_message(const tal_t *ctx,
|
|||||||
else if (!have_sigs[LOCAL] && have_sigs[REMOTE])
|
else if (!have_sigs[LOCAL] && have_sigs[REMOTE])
|
||||||
announce_status = " They need our announcement"
|
announce_status = " They need our announcement"
|
||||||
" signatures.";
|
" signatures.";
|
||||||
else if (!have_sigs[LOCAL] && !have_sigs[REMOTE])
|
else {
|
||||||
|
assert(!have_sigs[LOCAL] && !have_sigs[REMOTE]);
|
||||||
announce_status = "";
|
announce_status = "";
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
announce_status = "";
|
announce_status = "";
|
||||||
|
|
||||||
|
|||||||
@@ -734,15 +734,10 @@ json_to_address_scriptpubkey(const tal_t *ctx,
|
|||||||
char *addrz;
|
char *addrz;
|
||||||
const char *bip173;
|
const char *bip173;
|
||||||
|
|
||||||
bool parsed;
|
|
||||||
bool right_network;
|
|
||||||
u8 addr_version;
|
u8 addr_version;
|
||||||
|
|
||||||
parsed =
|
if (ripemd160_from_base58(&addr_version, &destination.addr,
|
||||||
ripemd160_from_base58(&addr_version, &destination.addr,
|
buffer + tok->start, tok->end - tok->start)) {
|
||||||
buffer + tok->start, tok->end - tok->start);
|
|
||||||
|
|
||||||
if (parsed) {
|
|
||||||
if (addr_version == chainparams->p2pkh_version) {
|
if (addr_version == chainparams->p2pkh_version) {
|
||||||
*scriptpubkey = scriptpubkey_p2pkh(ctx, &destination);
|
*scriptpubkey = scriptpubkey_p2pkh(ctx, &destination);
|
||||||
return ADDRESS_PARSE_SUCCESS;
|
return ADDRESS_PARSE_SUCCESS;
|
||||||
@@ -754,10 +749,11 @@ json_to_address_scriptpubkey(const tal_t *ctx,
|
|||||||
return ADDRESS_PARSE_WRONG_NETWORK;
|
return ADDRESS_PARSE_WRONG_NETWORK;
|
||||||
}
|
}
|
||||||
/* Insert other parsers that accept pointer+len here. */
|
/* Insert other parsers that accept pointer+len here. */
|
||||||
|
return ADDRESS_PARSE_UNRECOGNIZED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Generate null-terminated address. */
|
/* Generate null-terminated address. */
|
||||||
addrz = tal_dup_arr(ctx, char, buffer + tok->start, tok->end - tok->start, 1);
|
addrz = tal_dup_arr(tmpctx, char, buffer + tok->start, tok->end - tok->start, 1);
|
||||||
addrz[tok->end - tok->start] = '\0';
|
addrz[tok->end - tok->start] = '\0';
|
||||||
|
|
||||||
bip173 = segwit_addr_net_decode(&witness_version, witness_program,
|
bip173 = segwit_addr_net_decode(&witness_version, witness_program,
|
||||||
@@ -772,24 +768,18 @@ json_to_address_scriptpubkey(const tal_t *ctx,
|
|||||||
} else
|
} else
|
||||||
witness_ok = true;
|
witness_ok = true;
|
||||||
|
|
||||||
if (witness_ok) {
|
if (!witness_ok)
|
||||||
*scriptpubkey = scriptpubkey_witness_raw(ctx, witness_version,
|
return ADDRESS_PARSE_UNRECOGNIZED;
|
||||||
witness_program, witness_program_len);
|
|
||||||
parsed = true;
|
|
||||||
right_network = streq(bip173, chainparams->onchain_hrp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* Insert other parsers that accept null-terminated string here. */
|
|
||||||
|
|
||||||
tal_free(addrz);
|
if (!streq(bip173, chainparams->onchain_hrp))
|
||||||
|
|
||||||
if (parsed) {
|
|
||||||
if (right_network)
|
|
||||||
return ADDRESS_PARSE_SUCCESS;
|
|
||||||
else
|
|
||||||
return ADDRESS_PARSE_WRONG_NETWORK;
|
return ADDRESS_PARSE_WRONG_NETWORK;
|
||||||
|
|
||||||
|
*scriptpubkey = scriptpubkey_witness_raw(ctx, witness_version,
|
||||||
|
witness_program, witness_program_len);
|
||||||
|
return ADDRESS_PARSE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Insert other parsers that accept null-terminated string here. */
|
||||||
return ADDRESS_PARSE_UNRECOGNIZED;
|
return ADDRESS_PARSE_UNRECOGNIZED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -335,7 +335,7 @@ static struct command_result *finish_psbt(struct command *cmd,
|
|||||||
{
|
{
|
||||||
struct json_stream *response;
|
struct json_stream *response;
|
||||||
struct wally_psbt *psbt;
|
struct wally_psbt *psbt;
|
||||||
size_t change_outnum;
|
size_t change_outnum COMPILER_WANTS_INIT("gcc 9.4.0 -Og");
|
||||||
u32 current_height = get_block_height(cmd->ld->topology);
|
u32 current_height = get_block_height(cmd->ld->topology);
|
||||||
|
|
||||||
/* Setting the locktime to the next block to be mined has multiple
|
/* Setting the locktime to the next block to be mined has multiple
|
||||||
|
|||||||
Reference in New Issue
Block a user