Commit 97ad3498 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

refs #5537 zero out some structs because osx treats pthread_rwlock_init as...

refs #5537 zero out some structs because osx treats pthread_rwlock_init as "conditional jump on uninitialized values" and that's noise

git-svn-id: file:///svn/toku/tokudb@48424 c7de825b-a66e-492c-adef-691d508d4ae1
parent e359a65b
......@@ -35,9 +35,11 @@ struct checkpointer_test {
//
void checkpointer_test::test_begin_checkpoint() {
cachefile_list cfl;
ZERO_STRUCT(cfl);
cfl.init();
cachetable ctbl;
ZERO_STRUCT(ctbl);
ctbl.list.init();
ZERO_STRUCT(m_cp);
......@@ -88,9 +90,11 @@ void checkpointer_test::test_begin_checkpoint() {
//
void checkpointer_test::test_pending_bits() {
cachefile_list cfl;
ZERO_STRUCT(cfl);
cfl.init();
cachetable ctbl;
ZERO_STRUCT(ctbl);
ctbl.list.init();
ZERO_STRUCT(m_cp);
......@@ -237,9 +241,11 @@ static uint32_t get_number_pending_pairs(pair_list *list)
void checkpointer_test::test_end_checkpoint() {
// 1. Init test.
cachetable ctbl;
ZERO_STRUCT(ctbl);
ctbl.list.init();
cachefile_list cfl;
ZERO_STRUCT(cfl);
cfl.init();
struct cachefile cf;
......
......@@ -26,6 +26,7 @@ class evictor_unit_test {
// initialize this class to run tests
void evictor_unit_test::init() {
ZERO_STRUCT(m_pl);
m_pl.init();
m_kb = toku_kibbutz_create(1);
}
......
......@@ -8,9 +8,12 @@
#include <toku_pthread.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <memory.h>
int test_main(int argc __attribute__((__unused__)), char *const argv[] __attribute__((__unused__))) {
toku_pthread_rwlock_t rwlock;
ZERO_STRUCT(rwlock);
toku_pthread_rwlock_init(&rwlock, NULL);
toku_pthread_rwlock_rdlock(&rwlock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment