Skip to content

Commit

Permalink
lstm: Initialize member variable beam_size_
Browse files Browse the repository at this point in the history
Coverity report:

CID 1366450 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
4. uninit_member: Non-static class member beam_size_ is not initialized
 in this constructor nor in any functions that it calls.

Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Dec 1, 2016
1 parent 06b28a1 commit bb6cfc1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lstm/recodebeam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const int RecodeBeamSearch::kBeamWidths[RecodedCharID::kMaxCodeLen + 1] = {
RecodeBeamSearch::RecodeBeamSearch(const UnicharCompress& recoder,
int null_char, bool simple_text, Dict* dict)
: recoder_(recoder),
beam_size_(0),
dict_(dict),
space_delimited_(true),
is_simple_text_(simple_text),
Expand Down

0 comments on commit bb6cfc1

Please sign in to comment.