summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2012-06-04 16:45:05 +1000
committerMichael Cahill <michael.cahill@wiredtiger.com>2012-06-04 16:45:05 +1000
commit065753edc4c7e5e8c56d5600fb0562e15b166457 (patch)
treebc62b4cdd3f1359b11775de35918891a0314d8b0
parent4f05e1298898d51febaeaa3ab9e20de4bb2babf8 (diff)
downloadmongo-065753edc4c7e5e8c56d5600fb0562e15b166457.tar.gz
lint:
schema/schema_open.c:246:18: error: 'btree' may be used uninitialized in this function
-rw-r--r--src/schema/schema_open.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/schema/schema_open.c b/src/schema/schema_open.c
index f71551bebe9..9b37550c266 100644
--- a/src/schema/schema_open.c
+++ b/src/schema/schema_open.c
@@ -170,6 +170,7 @@ __open_index(WT_SESSION_IMPL *session, WT_TABLE *table,
ret = __wt_session_get_btree(
session, fileuri, NULL, WT_BTREE_EXCLUSIVE);
+ btree = session->btree;
if (ret == ENOENT)
__wt_errx(session,
"Index '%s' created but '%s' is missing", uri, fileuri);
@@ -177,8 +178,6 @@ __open_index(WT_SESSION_IMPL *session, WT_TABLE *table,
if (ret != 0)
goto err;
- btree = session->btree;
-
/*
* The key format for an index is somewhat subtle: the application
* specifies a set of columns that it will use for the key, but the