summaryrefslogtreecommitdiffstats
path: root/src/plugins/kdb/db2/libdb2/btree
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2011-09-05 01:22:03 +0000
committerKen Raeburn <raeburn@mit.edu>2011-09-05 01:22:03 +0000
commitf554a6b65fd09f71243af94691c48b3d4d2b1132 (patch)
tree69e2a01b0a727acaa92997274ffbd6ed799d4051 /src/plugins/kdb/db2/libdb2/btree
parent4c30cecad26f615bddbeaf610d51a2076fd407bb (diff)
downloadkrb5-f554a6b65fd09f71243af94691c48b3d4d2b1132.tar.gz
krb5-f554a6b65fd09f71243af94691c48b3d4d2b1132.tar.xz
krb5-f554a6b65fd09f71243af94691c48b3d4d2b1132.zip
Fix "may be used uninitialized" warnings in db2 code, even though all
such cases appear to be safe. This will permit making uninitialized-variable messages fatal. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25147 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/plugins/kdb/db2/libdb2/btree')
-rw-r--r--src/plugins/kdb/db2/libdb2/btree/bt_delete.c2
-rw-r--r--src/plugins/kdb/db2/libdb2/btree/bt_search.c4
-rw-r--r--src/plugins/kdb/db2/libdb2/btree/bt_seq.c4
-rw-r--r--src/plugins/kdb/db2/libdb2/btree/bt_split.c7
4 files changed, 9 insertions, 8 deletions
diff --git a/src/plugins/kdb/db2/libdb2/btree/bt_delete.c b/src/plugins/kdb/db2/libdb2/btree/bt_delete.c
index 02ae2e9be..4133aa3f0 100644
--- a/src/plugins/kdb/db2/libdb2/btree/bt_delete.c
+++ b/src/plugins/kdb/db2/libdb2/btree/bt_delete.c
@@ -150,7 +150,7 @@ __bt_stkacq(t, hp, c)
EPG *e;
EPGNO *parent;
PAGE *h;
- indx_t idx;
+ indx_t idx = 0;
db_pgno_t pgno;
recno_t nextpg, prevpg;
int exact, level;
diff --git a/src/plugins/kdb/db2/libdb2/btree/bt_search.c b/src/plugins/kdb/db2/libdb2/btree/bt_search.c
index de7ab126f..1f4f7160d 100644
--- a/src/plugins/kdb/db2/libdb2/btree/bt_search.c
+++ b/src/plugins/kdb/db2/libdb2/btree/bt_search.c
@@ -157,7 +157,7 @@ __bt_snext(t, h, key, exactp)
BINTERNAL *bi;
EPG e;
EPGNO *parent;
- indx_t idx;
+ indx_t idx = 0;
db_pgno_t pgno;
int level;
@@ -237,7 +237,7 @@ __bt_sprev(t, h, key, exactp)
BINTERNAL *bi;
EPG e;
EPGNO *parent;
- indx_t idx;
+ indx_t idx = 0;
db_pgno_t pgno;
int level;
diff --git a/src/plugins/kdb/db2/libdb2/btree/bt_seq.c b/src/plugins/kdb/db2/libdb2/btree/bt_seq.c
index 6124f968b..5707cab9b 100644
--- a/src/plugins/kdb/db2/libdb2/btree/bt_seq.c
+++ b/src/plugins/kdb/db2/libdb2/btree/bt_seq.c
@@ -269,7 +269,7 @@ __bt_seqadv(t, ep, flags)
{
CURSOR *c;
PAGE *h;
- indx_t idx;
+ indx_t idx = 0;
db_pgno_t pg;
int exact, rval;
@@ -818,7 +818,7 @@ bt_rseqadv(t, ep, rc, flags)
{
CURSOR *c;
PAGE *h;
- indx_t idx;
+ indx_t idx = 0;
db_pgno_t pg;
int status;
EPGNO *e;
diff --git a/src/plugins/kdb/db2/libdb2/btree/bt_split.c b/src/plugins/kdb/db2/libdb2/btree/bt_split.c
index 9b2708e76..2460aa54f 100644
--- a/src/plugins/kdb/db2/libdb2/btree/bt_split.c
+++ b/src/plugins/kdb/db2/libdb2/btree/bt_split.c
@@ -87,14 +87,14 @@ __bt_split(t, sp, key, data, flags, ilen, argskip)
size_t ilen;
u_int32_t argskip;
{
- BINTERNAL *bi;
- BLEAF *bl, *tbl;
+ BINTERNAL *bi = NULL;
+ BLEAF *bl = NULL, *tbl;
DBT a, b;
EPGNO *parent;
PAGE *h, *l, *r, *lchild, *rchild;
indx_t nxtindex;
u_int16_t skip;
- u_int32_t n, nbytes, nksize;
+ u_int32_t n, nbytes, nksize = 0;
int parentsplit;
char *dest;
@@ -637,6 +637,7 @@ bt_psplit(t, h, l, r, pskip, ilen)
full = t->bt_psize - BTDATAOFF;
half = full / 2;
used = 0;
+ src = NULL; /* silence gcc "uninitialized" warning */
for (nxt = off = 0, top = NEXTINDEX(h); nxt < top; ++off) {
if (skip == off) {
nbytes = ilen;