This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push: new c542855c5e Coverity 1521541: Uninitialized pointer field (#10488) c542855c5e is described below commit c542855c5e9ad88ff8a185df939c82ccfb079267 Author: Bryan Call <bc...@apache.org> AuthorDate: Fri Sep 22 06:46:45 2023 -0700 Coverity 1521541: Uninitialized pointer field (#10488) --- iocore/cache/P_CacheStats.h | 72 ++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/iocore/cache/P_CacheStats.h b/iocore/cache/P_CacheStats.h index b87b8f7dcf..f5d7b5767f 100644 --- a/iocore/cache/P_CacheStats.h +++ b/iocore/cache/P_CacheStats.h @@ -28,43 +28,43 @@ enum class CacheOpType { Lookup = 0, Read, Write, Update, Remove, Evacuate, Scan struct CacheStatsBlock { struct { - ts::Metrics::IntType *active; - ts::Metrics::IntType *success; - ts::Metrics::IntType *failure; + ts::Metrics::IntType *active = nullptr; + ts::Metrics::IntType *success = nullptr; + ts::Metrics::IntType *failure = nullptr; } status[static_cast<int>(CacheOpType::Last)]; - ts::Metrics::IntType *fragment_document_count[3]; // For 1, 2 and 3+ fragments + ts::Metrics::IntType *fragment_document_count[3] = {nullptr, nullptr, nullptr}; // For 1, 2 and 3+ fragments - ts::Metrics::IntType *bytes_used; - ts::Metrics::IntType *bytes_total; - ts::Metrics::IntType *stripes; - ts::Metrics::IntType *ram_cache_bytes; - ts::Metrics::IntType *ram_cache_bytes_total; - ts::Metrics::IntType *direntries_total; - ts::Metrics::IntType *direntries_used; - ts::Metrics::IntType *ram_cache_hits; - ts::Metrics::IntType *ram_cache_misses; - ts::Metrics::IntType *pread_count; - ts::Metrics::IntType *percent_full; - ts::Metrics::IntType *read_seek_fail; - ts::Metrics::IntType *read_invalid; - ts::Metrics::IntType *write_backlog_failure; - ts::Metrics::IntType *directory_collision_count; - ts::Metrics::IntType *read_busy_success; - ts::Metrics::IntType *read_busy_failure; - ts::Metrics::IntType *gc_bytes_evacuated; - ts::Metrics::IntType *gc_frags_evacuated; - ts::Metrics::IntType *write_bytes; - ts::Metrics::IntType *hdr_vector_marshal; - ts::Metrics::IntType *hdr_marshal; - ts::Metrics::IntType *hdr_marshal_bytes; - ts::Metrics::IntType *directory_wrap; - ts::Metrics::IntType *directory_sync_count; - ts::Metrics::IntType *directory_sync_time; - ts::Metrics::IntType *directory_sync_bytes; - ts::Metrics::IntType *span_errors_read; - ts::Metrics::IntType *span_errors_write; - ts::Metrics::IntType *span_offline; - ts::Metrics::IntType *span_online; - ts::Metrics::IntType *span_failing; + ts::Metrics::IntType *bytes_used = nullptr; + ts::Metrics::IntType *bytes_total = nullptr; + ts::Metrics::IntType *stripes = nullptr; + ts::Metrics::IntType *ram_cache_bytes = nullptr; + ts::Metrics::IntType *ram_cache_bytes_total = nullptr; + ts::Metrics::IntType *direntries_total = nullptr; + ts::Metrics::IntType *direntries_used = nullptr; + ts::Metrics::IntType *ram_cache_hits = nullptr; + ts::Metrics::IntType *ram_cache_misses = nullptr; + ts::Metrics::IntType *pread_count = nullptr; + ts::Metrics::IntType *percent_full = nullptr; + ts::Metrics::IntType *read_seek_fail = nullptr; + ts::Metrics::IntType *read_invalid = nullptr; + ts::Metrics::IntType *write_backlog_failure = nullptr; + ts::Metrics::IntType *directory_collision_count = nullptr; + ts::Metrics::IntType *read_busy_success = nullptr; + ts::Metrics::IntType *read_busy_failure = nullptr; + ts::Metrics::IntType *gc_bytes_evacuated = nullptr; + ts::Metrics::IntType *gc_frags_evacuated = nullptr; + ts::Metrics::IntType *write_bytes = nullptr; + ts::Metrics::IntType *hdr_vector_marshal = nullptr; + ts::Metrics::IntType *hdr_marshal = nullptr; + ts::Metrics::IntType *hdr_marshal_bytes = nullptr; + ts::Metrics::IntType *directory_wrap = nullptr; + ts::Metrics::IntType *directory_sync_count = nullptr; + ts::Metrics::IntType *directory_sync_time = nullptr; + ts::Metrics::IntType *directory_sync_bytes = nullptr; + ts::Metrics::IntType *span_errors_read = nullptr; + ts::Metrics::IntType *span_errors_write = nullptr; + ts::Metrics::IntType *span_offline = nullptr; + ts::Metrics::IntType *span_online = nullptr; + ts::Metrics::IntType *span_failing = nullptr; };