Skip to content

Commit

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

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

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Dec 1, 2016
1 parent afd069c commit 06b28a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lstm/lstm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ LSTM::LSTM(const STRING& name, int ni, int ns, int no, bool two_dimensional,
ns_(ns),
nf_(0),
is_2d_(two_dimensional),
softmax_(NULL) {
softmax_(NULL),
input_width_(0) {
if (two_dimensional) na_ += ns_;
if (type_ == NT_LSTM || type_ == NT_LSTM_SUMMARY) {
nf_ = 0;
Expand Down

0 comments on commit 06b28a1

Please sign in to comment.