summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Bostic <keith.bostic@mongodb.com>2016-09-13 21:27:58 -0400
committerAlex Gorrod <alexander.gorrod@mongodb.com>2016-09-14 11:27:58 +1000
commitbbdd7a8248e80ab41010278b211d042c070b4333 (patch)
tree7f78f7247c4ab0ead3c20c08d25436d6fdf0f5c3
parente0435cfe45041b429339166635cee74be4f2196c (diff)
downloadmongo-bbdd7a8248e80ab41010278b211d042c070b4333.tar.gz
WT-2912 make --enable-strict run on the zseries test box (#3038)
gcc 4.8.5 on the zseries (incorrectly) thinks callers of __wt_block_write_off() can use uninitialized size, offset and checksum returns, but those variables are only left uninitialized on error return. gcc 4.8.5 (Red Hat 4.8.5-4) Linux rhel72-z-wt.novalocal 3.10.0-327.4.4.el7.s390x #1 SMP Thu Dec 17 15:52:10 EST 2015 s390x s390x s390x GNU/Linux
-rw-r--r--src/block/block_write.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/block/block_write.c b/src/block/block_write.c
index 032f72d551b..4d01408d57d 100644
--- a/src/block/block_write.c
+++ b/src/block/block_write.c
@@ -236,6 +236,10 @@ __block_write_off(WT_SESSION_IMPL *session, WT_BLOCK *block,
uint32_t checksum;
bool local_locked;
+ *offsetp = 0; /* -Werror=maybe-uninitialized */
+ *sizep = 0; /* -Werror=maybe-uninitialized */
+ *checksump = 0; /* -Werror=maybe-uninitialized */
+
fh = block->fh;
/*