Skip to content

Commit

Permalink
build: fix maybe-uninitialized error on some gcc versions
Browse files Browse the repository at this point in the history
on gcc (GCC) 7.4.0

devtools/create-gossipstore.c: In function ‘main’:
devtools/create-gossipstore.c:107:9: error: ‘infd’ may be used uninitialized ..
  while (read_all(infd, &be_inlen, sizeof(be_inlen))) {
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
jb55 authored and cdecker committed Apr 8, 2019
1 parent 8a4ff05 commit 3d98ebb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion devtools/create-gossipstore.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ int main(int argc, char *argv[])
struct amount_sat sat;
bool verbose = false;
char *infile = NULL, *outfile = NULL, *scidfile = NULL, *csat = NULL;
int infd, outfd;
int infd = 0, outfd;
FILE * scidfd;
struct scidsat * scids = NULL;
unsigned max = -1U;
Expand Down

0 comments on commit 3d98ebb

Please sign in to comment.