From c5eae424f4ea452b9125f1bf87f3536659669bdc Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Wed, 16 Mar 2022 16:14:34 +0100 Subject: [PATCH] Initialize all fields. --- src/kernel/actor/CommObserver.hpp | 8 ++++---- src/kernel/resource/profile/ProfileBuilder.cpp | 9 +++------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/kernel/actor/CommObserver.hpp b/src/kernel/actor/CommObserver.hpp index dff6de5ab2..2d86bc6b49 100644 --- a/src/kernel/actor/CommObserver.hpp +++ b/src/kernel/actor/CommObserver.hpp @@ -89,8 +89,8 @@ class CommIsendSimcall : public SimcallObserver { size_t src_buff_size_; void* payload_; bool detached_; - activity::CommImpl* comm_; - int tag_; + activity::CommImpl* comm_ = {}; + int tag_ = {}; std::function match_fun_; std::function clean_fun_; // used to free the synchro in case of problem after a detached send @@ -140,8 +140,8 @@ class CommIrecvSimcall : public SimcallObserver { size_t* dst_buff_size_; void* payload_; double rate_; - int tag_; - activity::CommImpl* comm_; + activity::CommImpl* comm_ = {}; + int tag_ = {}; std::function match_fun_; std::function copy_data_fun_; // used to copy data if not default one diff --git a/src/kernel/resource/profile/ProfileBuilder.cpp b/src/kernel/resource/profile/ProfileBuilder.cpp index b92928ed5f..3db37261ff 100644 --- a/src/kernel/resource/profile/ProfileBuilder.cpp +++ b/src/kernel/resource/profile/ProfileBuilder.cpp @@ -68,12 +68,9 @@ std::ostream& operator << (std::ostream& out, const DatedValue& dv) { class LegacyUpdateCb { std::vector pattern; - - bool stochastic; - + bool stochastic = false; bool loop; - - double loop_delay; + double loop_delay = 0.0; static bool is_comment_or_empty_line(const std::string& val) { @@ -90,7 +87,7 @@ class LegacyUpdateCb { static bool is_uniform_distribution(const std::string& val) { return (val == "UNIF" || val == "UNIFORM"); } public: - LegacyUpdateCb(const std::string& input, double periodicity) : stochastic(false), loop(periodicity > 0), loop_delay(0) + LegacyUpdateCb(const std::string& input, double periodicity) : loop(periodicity > 0) { int linecount = 0; std::vector list; -- 2.20.1