From 3f15be8d92bc672b9570e24062bcc2730067f1e9 Mon Sep 17 00:00:00 2001 From: YuQing <384681@qq.com> Date: Thu, 25 Feb 2021 15:09:35 +0800 Subject: [PATCH] correct tests compile error and warning --- src/tests/test_data_visible.c | 2 +- src/tests/test_file_lock.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/test_data_visible.c b/src/tests/test_data_visible.c index 5a0f408..3aef6fb 100644 --- a/src/tests/test_data_visible.c +++ b/src/tests/test_data_visible.c @@ -127,7 +127,7 @@ int main(int argc, char *argv[]) { return result; } - allocator.exceed_log_level = LOG_NOTHING; + allocator.alloc_elements.exceed_log_level = LOG_NOTHING; if ((result=init_pthread_lock(&lock)) != 0) { return result; diff --git a/src/tests/test_file_lock.c b/src/tests/test_file_lock.c index f8feb8f..596e4f0 100644 --- a/src/tests/test_file_lock.c +++ b/src/tests/test_file_lock.c @@ -60,7 +60,7 @@ int main(int argc, char *argv[]) int fd; int result; int sleep_seconds; - int n; + int n = 0; char buf[1024]; struct flock lock;