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 { ...@@ -35,9 +35,11 @@ struct checkpointer_test {
// //
void checkpointer_test::test_begin_checkpoint() { void checkpointer_test::test_begin_checkpoint() {
cachefile_list cfl; cachefile_list cfl;
ZERO_STRUCT(cfl);
cfl.init(); cfl.init();
cachetable ctbl; cachetable ctbl;
ZERO_STRUCT(ctbl);
ctbl.list.init(); ctbl.list.init();
ZERO_STRUCT(m_cp); ZERO_STRUCT(m_cp);
...@@ -88,9 +90,11 @@ void checkpointer_test::test_begin_checkpoint() { ...@@ -88,9 +90,11 @@ void checkpointer_test::test_begin_checkpoint() {
// //
void checkpointer_test::test_pending_bits() { void checkpointer_test::test_pending_bits() {
cachefile_list cfl; cachefile_list cfl;
ZERO_STRUCT(cfl);
cfl.init(); cfl.init();
cachetable ctbl; cachetable ctbl;
ZERO_STRUCT(ctbl);
ctbl.list.init(); ctbl.list.init();
ZERO_STRUCT(m_cp); ZERO_STRUCT(m_cp);
...@@ -237,9 +241,11 @@ static uint32_t get_number_pending_pairs(pair_list *list) ...@@ -237,9 +241,11 @@ static uint32_t get_number_pending_pairs(pair_list *list)
void checkpointer_test::test_end_checkpoint() { void checkpointer_test::test_end_checkpoint() {
// 1. Init test. // 1. Init test.
cachetable ctbl; cachetable ctbl;
ZERO_STRUCT(ctbl);
ctbl.list.init(); ctbl.list.init();
cachefile_list cfl; cachefile_list cfl;
ZERO_STRUCT(cfl);
cfl.init(); cfl.init();
struct cachefile cf; struct cachefile cf;
......
...@@ -26,6 +26,7 @@ class evictor_unit_test { ...@@ -26,6 +26,7 @@ class evictor_unit_test {
// initialize this class to run tests // initialize this class to run tests
void evictor_unit_test::init() { void evictor_unit_test::init() {
ZERO_STRUCT(m_pl);
m_pl.init(); m_pl.init();
m_kb = toku_kibbutz_create(1); m_kb = toku_kibbutz_create(1);
} }
......
...@@ -8,9 +8,12 @@ ...@@ -8,9 +8,12 @@
#include <toku_pthread.h> #include <toku_pthread.h>
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
#include <string.h>
#include <memory.h>
int test_main(int argc __attribute__((__unused__)), char *const argv[] __attribute__((__unused__))) { int test_main(int argc __attribute__((__unused__)), char *const argv[] __attribute__((__unused__))) {
toku_pthread_rwlock_t rwlock; toku_pthread_rwlock_t rwlock;
ZERO_STRUCT(rwlock);
toku_pthread_rwlock_init(&rwlock, NULL); toku_pthread_rwlock_init(&rwlock, NULL);
toku_pthread_rwlock_rdlock(&rwlock); 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