From 77d5ec162051cf2b21679880db64dbe5cf924ab8 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 23 Jun 2022 11:23:38 +0100 Subject: [PATCH] Initialize zstd_base::level in constructor It does actually get initialized when the derived class calls zstd_base::init but setting it in the constructor prevents static analyzers from complaining. --- src/zstd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zstd.cpp b/src/zstd.cpp index 20cc00980..aef9b14ee 100644 --- a/src/zstd.cpp +++ b/src/zstd.cpp @@ -56,7 +56,7 @@ void zstd_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(size_t error) namespace detail { zstd_base::zstd_base() - : cstream_(ZSTD_createCStream()), dstream_(ZSTD_createDStream()), in_(new ZSTD_inBuffer), out_(new ZSTD_outBuffer), eof_(0) + : cstream_(ZSTD_createCStream()), dstream_(ZSTD_createDStream()), in_(new ZSTD_inBuffer), out_(new ZSTD_outBuffer), eof_(0), level(zstd::default_compression) { } zstd_base::~zstd_base()