Browse Source

lightningd: fix compile error in peer_control

Error on gcc 7.3.0:

lightningd/peer_control.c: In function ‘json_close’:
lightningd/peer_control.c:955:3: error: ‘channel’ may be used uninitialized in
  this function [-Werror=maybe-uninitialized]
   channel_set_state(channel,
   ^~~~~~~~~~~~~~~~~~~~~~~~~~
       channel->state, CHANNELD_SHUTTING_DOWN);

Signed-off-by: William Casarin <jb55@jb55.com>
pr-2218
William Casarin 6 years ago
committed by Rusty Russell
parent
commit
0fa209c64d
  1. 2
      lightningd/peer_control.c

2
lightningd/peer_control.c

@ -901,7 +901,7 @@ static struct command_result *json_close(struct command *cmd,
{
const jsmntok_t *idtok;
struct peer *peer;
struct channel *channel;
struct channel *channel = NULL;
unsigned int *timeout;
bool *force;

Loading…
Cancel
Save