Skip to content

Commit

Permalink
Fix erlfdb_database_set_option else case
Browse files Browse the repository at this point in the history
This was detected with more a recent compiler as an uninitialized variable:

```
c_src/main.c: In function 'erlfdb_database_set_option':
c_src/main.c:818:9: error: 'option' may be used uninitialized in this function [-Werror=maybe-uninitialized]
```
  • Loading branch information
nickva committed Mar 9, 2021
1 parent abd92fa commit ea54b1a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions c_src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,7 @@ erlfdb_database_set_option(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
option = FDB_DB_OPTION_TRANSACTION_CAUSAL_READ_RISKY;
} else if(IS_ATOM(argv[1], include_port_in_address)) {
option = FDB_DB_OPTION_TRANSACTION_INCLUDE_PORT_IN_ADDRESS;
} else {
return enif_make_badarg(env);
}

Expand Down

0 comments on commit ea54b1a

Please sign in to comment.