You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2021/03/09 20:07:24 UTC
[couchdb-erlfdb] branch fix-db-option-else-case created (now
a41fc9e)
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a change to branch fix-db-option-else-case
in repository https://gitbox.apache.org/repos/asf/couchdb-erlfdb.git.
at a41fc9e Fix erlfdb_database_set_option `else` case
This branch includes the following new commits:
new a41fc9e Fix erlfdb_database_set_option `else` case
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[couchdb-erlfdb] 01/01: Fix erlfdb_database_set_option `else` case
Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch fix-db-option-else-case
in repository https://gitbox.apache.org/repos/asf/couchdb-erlfdb.git
commit a41fc9e130aaea2728f23823803fd975ff7650af
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Tue Mar 9 15:04:44 2021 -0500
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]
```
---
c_src/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/c_src/main.c b/c_src/main.c
index 807b7ae..45fb22e 100644
--- a/c_src/main.c
+++ b/c_src/main.c
@@ -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);
}