This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 1021763 in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 70b277f7658b9da9fb2169c0d7ac8f2142d0cd47 Author: Bryan Call <bc...@apache.org> AuthorDate: Tue May 9 12:18:24 2017 -0400 coverity 1021763: Uninitialized pointer field --- iocore/cache/CacheTest.cc | 20 +------------------- iocore/cache/P_CacheTest.h | 36 ++++++++++++++++++------------------ 2 files changed, 19 insertions(+), 37 deletions(-) diff --git a/iocore/cache/CacheTest.cc b/iocore/cache/CacheTest.cc index a0e5073..52d3b30 100644 --- a/iocore/cache/CacheTest.cc +++ b/iocore/cache/CacheTest.cc @@ -30,25 +30,7 @@ using namespace std; -CacheTestSM::CacheTestSM(RegressionTest *t, const char *name) - : RegressionSM(t), - start_memcpy_on_clone(0), - cache_test_name(name), - timeout(nullptr), - cache_action(nullptr), - start_time(0), - cache_vc(nullptr), - cvio(nullptr), - buffer(nullptr), - buffer_reader(nullptr), - total_size(0), - nbytes(-1), - repeat_count(0), - expect_event(EVENT_NONE), - expect_initial_event(EVENT_NONE), - initial_event(EVENT_NONE), - content_salt(0), - end_memcpy_on_clone(0) +CacheTestSM::CacheTestSM(RegressionTest *t, const char *name) : RegressionSM(t), cache_test_name(name) { SET_HANDLER(&CacheTestSM::event_handler); } diff --git a/iocore/cache/P_CacheTest.h b/iocore/cache/P_CacheTest.h index 336c533..de2b1e8 100644 --- a/iocore/cache/P_CacheTest.h +++ b/iocore/cache/P_CacheTest.h @@ -63,30 +63,30 @@ struct CacheTestHeader { }; struct CacheTestSM : public RegressionSM { - int start_memcpy_on_clone; // place all variables to be copied between these markers + int start_memcpy_on_clone = 0; // place all variables to be copied between these markers // Cache test instance name. This is a pointer to a string literal, so copying is safe. - const char *cache_test_name; - - Action *timeout; - Action *cache_action; - ink_hrtime start_time; - CacheVConnection *cache_vc; - VIO *cvio; - MIOBuffer *buffer; - IOBufferReader *buffer_reader; + const char *cache_test_name = nullptr; + + Action *timeout = nullptr; + Action *cache_action = nullptr; + ink_hrtime start_time = 0; + CacheVConnection *cache_vc = nullptr; + VIO *cvio = nullptr; + MIOBuffer *buffer = nullptr; + IOBufferReader *buffer_reader = nullptr; CacheHTTPInfo info; char urlstr[1024]; - int64_t total_size; - int64_t nbytes; + int64_t total_size = 0; + int64_t nbytes = -1; CacheKey key; - int repeat_count; - int expect_event; - int expect_initial_event; - int initial_event; - uint64_t content_salt; + int repeat_count = 0; + int expect_event = EVENT_NONE; + int expect_initial_event = EVENT_NONE; + int initial_event = EVENT_NONE; + uint64_t content_salt = 0; CacheTestHeader header; - int end_memcpy_on_clone; // place all variables to be copied between these markers + int end_memcpy_on_clone = 0; // place all variables to be copied between these markers void fill_buffer(); int check_buffer(); -- To stop receiving notification emails like this one, please contact "commits@trafficserver.apache.org" <commits@trafficserver.apache.org>.