summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteinar H. Gunderson <sesse@google.com>2015-06-22 16:10:47 +0200
committerSteinar H. Gunderson <sesse@google.com>2015-07-06 14:21:16 +0200
commiteb66d8176b3d1f560ee012e1b488cb1540c45f88 (patch)
tree59528c23acd073897c033a4c848cd4145e518825
parentb2312c4c25883ab03b5110f1b006dce95f419a4f (diff)
downloadsnappy-eb66d8176b3d1f560ee012e1b488cb1540c45f88.tar.gz
snappy-eb66d8176b3d1f560ee012e1b488cb1540c45f88.tar.bz2
snappy-eb66d8176b3d1f560ee012e1b488cb1540c45f88.zip
Initialized members of SnappyArrayWriter and SnappyDecompressionValidator.
These members were almost surely initialized before use by other member functions, but Coverity was warning about this. Eliminating these warnings minimizes clutter in that report and the likelihood of overlooking a real bug. A=cmumford R=jeff
-rw-r--r--snappy.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/snappy.cc b/snappy.cc
index b973d63..b6ca7ec 100644
--- a/snappy.cc
+++ b/snappy.cc
@@ -1147,7 +1147,8 @@ class SnappyArrayWriter {
public:
inline explicit SnappyArrayWriter(char* dst)
: base_(dst),
- op_(dst) {
+ op_(dst),
+ op_limit_(dst) {
}
inline void SetExpectedLength(size_t len) {
@@ -1254,7 +1255,7 @@ class SnappyDecompressionValidator {
size_t produced_;
public:
- inline SnappyDecompressionValidator() : produced_(0) { }
+ inline SnappyDecompressionValidator() : expected_(0), produced_(0) { }
inline void SetExpectedLength(size_t len) {
expected_ = len;
}