[25657] in CVS-changelog-for-Kerberos-V5
svn rev #25147: trunk/src/plugins/kdb/db2/libdb2/ btree/ hash/ recno/
daemon@ATHENA.MIT.EDU (raeburn@mit.edu)
Sun Sep 4 21:22:06 2011
Date: Sun, 4 Sep 2011 21:22:03 -0400
From: raeburn@mit.edu
Message-Id: <201109050122.p851M3Be015637@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu
http://src.mit.edu/fisheye/changelog/krb5/?cs=25147
Commit By: raeburn
Log Message:
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.
Changed Files:
U trunk/src/plugins/kdb/db2/libdb2/btree/bt_delete.c
U trunk/src/plugins/kdb/db2/libdb2/btree/bt_search.c
U trunk/src/plugins/kdb/db2/libdb2/btree/bt_seq.c
U trunk/src/plugins/kdb/db2/libdb2/btree/bt_split.c
U trunk/src/plugins/kdb/db2/libdb2/hash/hash_page.c
U trunk/src/plugins/kdb/db2/libdb2/recno/rec_open.c
Modified: trunk/src/plugins/kdb/db2/libdb2/btree/bt_delete.c
===================================================================
--- trunk/src/plugins/kdb/db2/libdb2/btree/bt_delete.c 2011-09-05 01:21:55 UTC (rev 25146)
+++ trunk/src/plugins/kdb/db2/libdb2/btree/bt_delete.c 2011-09-05 01:22:03 UTC (rev 25147)
@@ -150,7 +150,7 @@
EPG *e;
EPGNO *parent;
PAGE *h;
- indx_t idx;
+ indx_t idx = 0;
db_pgno_t pgno;
recno_t nextpg, prevpg;
int exact, level;
Modified: trunk/src/plugins/kdb/db2/libdb2/btree/bt_search.c
===================================================================
--- trunk/src/plugins/kdb/db2/libdb2/btree/bt_search.c 2011-09-05 01:21:55 UTC (rev 25146)
+++ trunk/src/plugins/kdb/db2/libdb2/btree/bt_search.c 2011-09-05 01:22:03 UTC (rev 25147)
@@ -157,7 +157,7 @@
BINTERNAL *bi;
EPG e;
EPGNO *parent;
- indx_t idx;
+ indx_t idx = 0;
db_pgno_t pgno;
int level;
@@ -237,7 +237,7 @@
BINTERNAL *bi;
EPG e;
EPGNO *parent;
- indx_t idx;
+ indx_t idx = 0;
db_pgno_t pgno;
int level;
Modified: trunk/src/plugins/kdb/db2/libdb2/btree/bt_seq.c
===================================================================
--- trunk/src/plugins/kdb/db2/libdb2/btree/bt_seq.c 2011-09-05 01:21:55 UTC (rev 25146)
+++ trunk/src/plugins/kdb/db2/libdb2/btree/bt_seq.c 2011-09-05 01:22:03 UTC (rev 25147)
@@ -269,7 +269,7 @@
{
CURSOR *c;
PAGE *h;
- indx_t idx;
+ indx_t idx = 0;
db_pgno_t pg;
int exact, rval;
@@ -818,7 +818,7 @@
{
CURSOR *c;
PAGE *h;
- indx_t idx;
+ indx_t idx = 0;
db_pgno_t pg;
int status;
EPGNO *e;
Modified: trunk/src/plugins/kdb/db2/libdb2/btree/bt_split.c
===================================================================
--- trunk/src/plugins/kdb/db2/libdb2/btree/bt_split.c 2011-09-05 01:21:55 UTC (rev 25146)
+++ trunk/src/plugins/kdb/db2/libdb2/btree/bt_split.c 2011-09-05 01:22:03 UTC (rev 25147)
@@ -87,14 +87,14 @@
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 @@
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;
Modified: trunk/src/plugins/kdb/db2/libdb2/hash/hash_page.c
===================================================================
--- trunk/src/plugins/kdb/db2/libdb2/hash/hash_page.c 2011-09-05 01:21:55 UTC (rev 25146)
+++ trunk/src/plugins/kdb/db2/libdb2/hash/hash_page.c 2011-09-05 01:22:03 UTC (rev 25147)
@@ -1093,6 +1093,7 @@
* before being set, however, this loop will ALWAYS get executed
* at least once, so freep is guaranteed to be set.
*/
+ freep = NULL;
first_page = hashp->hdr.last_freed >> (hashp->hdr.bshift + BYTE_SHIFT);
for (i = first_page; i <= free_page; i++) {
if (!(freep = fetch_bitmap(hashp, i)))
Modified: trunk/src/plugins/kdb/db2/libdb2/recno/rec_open.c
===================================================================
--- trunk/src/plugins/kdb/db2/libdb2/recno/rec_open.c 2011-09-05 01:21:55 UTC (rev 25146)
+++ trunk/src/plugins/kdb/db2/libdb2/recno/rec_open.c 2011-09-05 01:22:03 UTC (rev 25147)
@@ -65,7 +65,7 @@
DB *dbp;
PAGE *h;
struct stat sb;
- int rfd, sverrno;
+ int rfd = -1, sverrno;
/* Open the user's file -- if this fails, we're done. */
if (fname != NULL && (rfd = open(fname, flags | O_BINARY, mode)) < 0)
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5