From d3123c16f7d9cd82d8fcff0746d7c723aac1b3bd Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sat, 7 Sep 2024 12:55:10 +0200 Subject: [PATCH] initialize boolean (reported by coverity) --- src/Statistics.cpp | 2 +- src/Statistics.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Statistics.cpp b/src/Statistics.cpp index b0e109b584..a2e7023155 100644 --- a/src/Statistics.cpp +++ b/src/Statistics.cpp @@ -33,7 +33,7 @@ void Statistics::update(CursorData const & cur, bool skip) { // early exit if the buffer has not changed since last time if (stats_id_ == cur.buffer()->id()) - return; + return; // reset counts *this = Statistics(); diff --git a/src/Statistics.h b/src/Statistics.h index e91e9fc340..195af0382c 100644 --- a/src/Statistics.h +++ b/src/Statistics.h @@ -55,7 +55,7 @@ private: void update(Paragraph const & par, pos_type from = 0, pos_type to = -1); // Indicate whether parts that produce no output should be counted. - bool skip_no_output_; + bool skip_no_output_ = false; // Used in the code to track status bool inword_ = false; // The buffer id at last statistics computation. -- 2.39.5