Skip to content

Commit

Permalink
lightningd: fix compile error in peer_control
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jb55 authored and rustyrussell committed Jan 2, 2019
1 parent 4d9190a commit 0fa209c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lightningd/peer_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 0fa209c

Please sign in to comment.