From e0ea7f2504a7ea7a284b0ceeed1fedf91ed87496 Mon Sep 17 00:00:00 2001 From: Greg Burd Date: Sun, 6 Mar 2016 20:11:34 -0500 Subject: [PATCH] Quel compiler warnings. --- c_src/lmdb.c | 1 + c_src/lmdb_nif.c | 2 +- tools/update-mdb | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100755 tools/update-mdb diff --git a/c_src/lmdb.c b/c_src/lmdb.c index a366b40..c49035c 100644 --- a/c_src/lmdb.c +++ b/c_src/lmdb.c @@ -10671,6 +10671,7 @@ int mdb_set_relctx(MDB_txn *txn, MDB_dbi dbi, void *ctx) int ESECT mdb_env_get_maxkeysize(MDB_env *env) { + env = env; return ENV_MAXKEY(env); } diff --git a/c_src/lmdb_nif.c b/c_src/lmdb_nif.c index f1a0c50..67cada3 100644 --- a/c_src/lmdb_nif.c +++ b/c_src/lmdb_nif.c @@ -102,7 +102,7 @@ static ERL_NIF_TERM ATOM_TXN_NOT_STARTED; static ERL_NIF_TERM __strerror_term(ErlNifEnv* env, int err) { - ERL_NIF_TERM term; + ERL_NIF_TERM term = 0; if (err < MDB_LAST_ERRCODE && err > MDB_KEYEXIST) { switch (err) { diff --git a/tools/update-mdb b/tools/update-mdb new file mode 100755 index 0000000..d3e32ec --- /dev/null +++ b/tools/update-mdb @@ -0,0 +1,6 @@ +#!/bin/bash + +for file in lmdb.h mdb.c midl.h midl.c; do + curl -O https://raw.githubusercontent.com/LMDB/lmdb/mdb.master/libraries/liblmdb/$file +done +