Skip to content

Commit 06b28a1

Browse files
committed
lstm: Initialize member variable input_width_
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 <[email protected]>
1 parent afd069c commit 06b28a1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lstm/lstm.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ LSTM::LSTM(const STRING& name, int ni, int ns, int no, bool two_dimensional,
7474
ns_(ns),
7575
nf_(0),
7676
is_2d_(two_dimensional),
77-
softmax_(NULL) {
77+
softmax_(NULL),
78+
input_width_(0) {
7879
if (two_dimensional) na_ += ns_;
7980
if (type_ == NT_LSTM || type_ == NT_LSTM_SUMMARY) {
8081
nf_ = 0;

0 commit comments

Comments
 (0)