liblmdb: fix warnings in lmdb-tools.

Change-Id: I1a1de4bcb9ce9b27f9278f74535e6e83de25bad0
This commit is contained in:
Leo Yuriev 2015-03-24 13:29:55 +03:00
parent 88b465a6ed
commit 9a76b0a008
3 changed files with 6 additions and 2 deletions

View File

@ -18,7 +18,7 @@
# read mdb.c before changing any of them.
#
CC = gcc
W = -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized
W = -Wall -Werror -Wno-unused-parameter
THREADS = -pthread
XCFLAGS ?= $(CFLAGS)
OPT = -O2 -g

View File

@ -30,7 +30,7 @@ sighandle(int sig)
int main(int argc,char * argv[])
{
int rc;
MDB_env *env;
MDB_env *env = NULL;
const char *progname = argv[0], *act;
unsigned flags = MDB_RDONLY;
unsigned cpflags = 0;

View File

@ -134,6 +134,10 @@ int main(int argc, char *argv[])
mei.me_tail_txnid, mei.me_tail_txnid - mei.me_last_txnid);
printf(" Max readers: %u\n", mei.me_maxreaders);
printf(" Number of readers used: %u\n", mei.me_numreaders);
} else {
/* LY: zap warnings from gcc */
memset(&mst, 0, sizeof(mst));
memset(&mei, 0, sizeof(mei));
}
if (rdrinfo) {