Skip to content

Commit

Permalink
Initialized members of SnappyArrayWriter and SnappyDecompressionValid…
Browse files Browse the repository at this point in the history
…ator.

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
  • Loading branch information
sesse committed Jul 6, 2015
1 parent b2312c4 commit eb66d81
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions snappy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit eb66d81

Please sign in to comment.