summaryrefslogtreecommitdiff
path: root/src/packing
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2012-01-31 10:38:15 +1100
committerMichael Cahill <michael.cahill@wiredtiger.com>2012-01-31 10:38:15 +1100
commit3f87e3d0879e57ebcee80ed7a9add8cfec4dd139 (patch)
tree638df0a827c9432582258c0a0112c99ad58ab292 /src/packing
parent1126502e05e78d02f01bdc0a687168daf43ca084 (diff)
downloadmongo-3f87e3d0879e57ebcee80ed7a9add8cfec4dd139.tar.gz
Fix uninitialized warnings with GCC 4.2.
Diffstat (limited to 'src/packing')
-rw-r--r--src/packing/packing.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/packing/packing.c b/src/packing/packing.c
index 090517567ca..7fe751f6d44 100644
--- a/src/packing/packing.c
+++ b/src/packing/packing.c
@@ -20,6 +20,8 @@ __wt_struct_check(WT_SESSION_IMPL *session,
WT_PACK_VALUE pv;
int fields, ret;
+ WT_CLEAR(pv); /* -Wuninitialized. */
+
WT_RET(__pack_initn(session, &pack, fmt, len));
for (fields = 0; (ret = __pack_next(&pack, &pv)) == 0; fields++)
@@ -53,6 +55,8 @@ __wt_struct_sizev(WT_SESSION_IMPL *session, const char *fmt, va_list ap)
WT_PACK_VALUE pv;
size_t total;
+ WT_CLEAR(pv); /* -Wuninitialized */
+
if (__pack_init(session, &pack, fmt) != 0)
return ((size_t)-1);
@@ -93,6 +97,8 @@ __wt_struct_packv(WT_SESSION_IMPL *session,
uint8_t *p, *end;
int ret;
+ WT_CLEAR(pv); /* -Wuninitialized */
+
WT_RET(__pack_init(session, &pack, fmt));
p = buffer;