This is an automated email from the ASF dual-hosted git repository.

chenBright pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brpc.git


The following commit(s) were added to refs/heads/master by this push:
     new 154783f9 Fix PercentileSamples initialization warning (#3613)
154783f9 is described below

commit 154783f948ec2b761227bb4a3a9421621b634406
Author: songgaoye <[email protected]>
AuthorDate: Thu Oct 15 15:01:36 2026 +0800

    Fix PercentileSamples initialization warning (#3613)
---
 src/bvar/detail/percentile.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/bvar/detail/percentile.h b/src/bvar/detail/percentile.h
index 85e681d9..b848f894 100644
--- a/src/bvar/detail/percentile.h
+++ b/src/bvar/detail/percentile.h
@@ -285,8 +285,9 @@ friend class AddLatency;
 
     static const size_t SAMPLE_SIZE = SAMPLE_SIZE_IN;
     
-    PercentileSamples() {
-        memset(this, 0, sizeof(*this));
+    PercentileSamples()
+        : _num_added(0)
+        , _intervals() {
     }
 
     ~PercentileSamples() {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to