Skip to content

Commit

Permalink
foros_inspector: fix uninitialized field
Browse files Browse the repository at this point in the history
fix CID 257434

Signed-off-by: Wonguk Jeong <wonguk.jeong@42dot.ai>
  • Loading branch information
huchijwk committed Jun 7, 2022
1 parent 908d10b commit cecb810
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion foros_inspector/src/node_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,14 @@ namespace foros_inspector {

class NodeInfo {
public:
explicit NodeInfo(uint32_t id) : id_(id), last_updated_(0, 0, RCL_ROS_TIME) {}
explicit NodeInfo(uint32_t id)
: id_(id),
size_(0),
state_(0),
term_(0),
data_size_(0),
voted_for_(0),
last_updated_(0, 0, RCL_ROS_TIME) {}

uint32_t id_;
uint32_t size_;
Expand Down

0 comments on commit cecb810

Please sign in to comment.