Skip to content

Commit ea54b1a

Browse files
committed
Fix erlfdb_database_set_option else case
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] ```
1 parent abd92fa commit ea54b1a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

c_src/main.c

+1
Original file line numberDiff line numberDiff line change
@@ -808,6 +808,7 @@ erlfdb_database_set_option(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
808808
option = FDB_DB_OPTION_TRANSACTION_CAUSAL_READ_RISKY;
809809
} else if(IS_ATOM(argv[1], include_port_in_address)) {
810810
option = FDB_DB_OPTION_TRANSACTION_INCLUDE_PORT_IN_ADDRESS;
811+
} else {
811812
return enif_make_badarg(env);
812813
}
813814

0 commit comments

Comments
 (0)