-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new ecal-core #1353
new ecal-core #1353
Conversation
public API ecal/types/monitoring.h changed (removal of deprecated content)
mon_tui fixed
ecal_service_server_impl description registration fixed pub/sub test excluded that failed because of currently missing API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There were too many comments to post at once. Showing the first 20 out of 258. Check the log or trigger a new build to see more.
|
||
if (eCAL::Monitoring::GetLogging(logging_string)) | ||
if (eCAL::Logging::GetLogging(logging_string)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: implicit conversion 'int' -> bool [readability-implicit-bool-conversion]
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:193:
- )
+ != 0)
{ | ||
int inserted_row_count = logging_pb.logs().size(); | ||
int inserted_row_count = logging_pb.log_messages().size(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'inserted_row_count' of type 'int' can be declared 'const' [misc-const-correctness]
int inserted_row_count = logging_pb.log_messages().size(); | |
{const |
@@ -244,7 +244,7 @@ | |||
beginInsertRows(QModelIndex(), size_before, size_after - 1); | |||
|
|||
int counter = inserted_row_count; | |||
for (auto& log_message_pb : logging_pb.logs()) | |||
for (auto& log_message_pb : logging_pb.log_messages()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'auto &log_message_pb' can be declared as 'const auto &log_message_pb' [readability-qualified-auto]
for (auto& log_message_pb : logging_pb.log_messages()) | |
;const |
@@ -73,7 +74,7 @@ class LogModel : public QAbstractItemModel | |||
QModelIndex parent(const QModelIndex &index) const override; | |||
Qt::ItemFlags flags(const QModelIndex &index) const override; | |||
|
|||
void insertLogs(const eCAL::pb::Logging& logs); | |||
void insertLogs(const eCAL::pb::LogMessageList& logs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: function 'LogModel::insertLogs' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
^
Additional context
app/mon/mon_gui/src/widgets/models/log_model.cpp:216: the definition seen here
^
app/mon/mon_gui/src/widgets/models/log_model.h:76: differing parameters are named here: ('logs'), in definition: ('logging_pb')
^
logs.ParseFromString(raw_data); | ||
|
||
auto &pb_logs = logs.logs(); | ||
auto &pb_logs = logs.log_messages(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'auto &pb_logs' can be declared as 'const auto &pb_logs' [readability-qualified-auto]
auto &pb_logs = logs.log_messages(); | |
const auto &pb_logs = logs.log_messages(); |
// Indicates that there was a warning in the input at the given line and | ||
// column numbers. The numbers are zero-based, so you may want to add | ||
// 1 to each before printing them. | ||
void AddWarning(int line_, int column_, const std::string& msg_) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions]
void AddWarning(int line_, int column_, const std::string& msg_) | |
void AddWarning(int line_, int column_, const std::string& msg_) override |
std::stringstream m_ss; | ||
}; | ||
|
||
class DescriptorErrorCollector : public google::protobuf::DescriptorPool::ErrorCollector |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: class 'DescriptorErrorCollector' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions]
class DescriptorErrorCollector : public google::protobuf::DescriptorPool::ErrorCollector
^
class DescriptorErrorCollector : public google::protobuf::DescriptorPool::ErrorCollector | ||
{ | ||
public: | ||
DescriptorErrorCollector() {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: use '= default' to define a trivial default constructor [modernize-use-equals-default]
DescriptorErrorCollector() {} | |
DescriptorErrorCollector() = default; |
{ | ||
public: | ||
DescriptorErrorCollector() {} | ||
~DescriptorErrorCollector() {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions]
~DescriptorErrorCollector() {} | |
~DescriptorErrorCollector() override {} |
{ | ||
public: | ||
DescriptorErrorCollector() {} | ||
~DescriptorErrorCollector() {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: use '= default' to define a trivial destructor [modernize-use-equals-default]
~DescriptorErrorCollector() {} | |
~DescriptorErrorCollector() = default; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There were too many comments to post at once. Showing the first 20 out of 238. Check the log or trigger a new build to see more.
|
||
std::string Get() { return (m_ss.str()); } | ||
|
||
void AddError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions]
ecal/core/include/ecal/msg/protobuf/ecal_proto_dyn.h:226:
- )
+ ) override
Add(filename, element_name, descriptor, location, "ERROR: " + message); | ||
} | ||
|
||
void AddWarning( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: annotate this function with 'override' or (rarely) 'final' [cppcoreguidelines-explicit-virtual-functions]
ecal/core/include/ecal/msg/protobuf/ecal_proto_dyn.h:237:
- )
+ ) override
|
||
// create message object | ||
google::protobuf::Message* proto_msg = GetProtoMessageFromDescriptorSet(pset, msg_type_, error_s_); | ||
if (!proto_msg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: implicit conversion 'google::protobuf::Message *' -> bool [readability-implicit-bool-conversion]
if (!proto_msg) | |
if (proto_msg == nullptr) |
std::stringstream ss; | ||
ss << fs.rdbuf(); | ||
|
||
std::string proto_str = ss.str(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'proto_str' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness]
std::string proto_str = ss.str(); | |
std::string const proto_str = ss.str(); |
return (GetFileDescriptorFromString(proto_str, file_desc_proto_, error_s_)); | ||
} | ||
|
||
inline bool CProtoDynDecoder::GetFileDescriptorFromString(const std::string& proto_string_, google::protobuf::FileDescriptorProto* file_desc_proto_, std::string& error_s_) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: method 'GetFileDescriptorFromString' can be made static [readability-convert-member-functions-to-static]
ecal/core/include/ecal/msg/protobuf/ecal_proto_dyn.h:172:
- bool GetFileDescriptorFromString(const std::string& proto_string_, google::protobuf::FileDescriptorProto* file_desc_proto_, std::string& error_s_);
+ static bool GetFileDescriptorFromString(const std::string& proto_string_, google::protobuf::FileDescriptorProto* file_desc_proto_, std::string& error_s_);
connections_loc = 0; | ||
connections_ext = 0; | ||
message_drops = 0; | ||
did = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'did' should be initialized in an in-class default member initializer [cppcoreguidelines-prefer-member-initializer]
did = 0; | |
ecal/core/include/ecal/types/monitoring.h:103:
- int64_t did; //!< data send id (publisher setid)
+ int64_t did{0}; //!< data send id (publisher setid)
connections_ext = 0; | ||
message_drops = 0; | ||
did = 0; | ||
dclock = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'dclock' should be initialized in an in-class default member initializer [cppcoreguidelines-prefer-member-initializer]
dclock = 0; | |
ecal/core/include/ecal/types/monitoring.h:104:
- int64_t dclock; //!< data clock (send / receive action)
+ int64_t dclock{0}; //!< data clock (send / receive action)
message_drops = 0; | ||
did = 0; | ||
dclock = 0; | ||
dfreq = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'dfreq' should be initialized in an in-class default member initializer [cppcoreguidelines-prefer-member-initializer]
dfreq = 0; | |
ecal/core/include/ecal/types/monitoring.h:105:
- int32_t dfreq; //!< data frequency (send / receive samples per second) [mHz]
+ int32_t dfreq{0}; //!< data frequency (send / receive samples per second) [mHz]
@@ -177,23 +176,24 @@ | |||
{ | |||
SServerMon() | |||
{ | |||
rclock = 0; | |||
pid = 0; | |||
rclock = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'rclock' should be initialized in an in-class default member initializer [cppcoreguidelines-prefer-member-initializer]
rclock = 0; | |
ecal/core/include/ecal/types/monitoring.h:184:
- int32_t rclock; //<! registration clock
+ int32_t rclock{0}; //<! registration clock
rclock = 0; | ||
pid = 0; | ||
rclock = 0; | ||
pid = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'pid' should be initialized in an in-class default member initializer [cppcoreguidelines-prefer-member-initializer]
pid = 0; | |
ecal/core/include/ecal/types/monitoring.h:188:
- int32_t pid; //<! process id
+ int32_t pid{0}; //<! process id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There were too many comments to post at once. Showing the first 20 out of 218. Check the log or trigger a new build to see more.
if(ret) | ||
{ | ||
std::string topic_type_s = topic_info.name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'topic_type_s' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness]
std::string topic_type_s = topic_info.name; | |
std::string const topic_type_s = topic_info.name; |
bool ret = eCAL::Util::GetTopicDataTypeInformation(topic_name_, topic_info); | ||
if (ret) | ||
{ | ||
std::string topic_encoding_s = topic_info.encoding; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'topic_encoding_s' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness]
std::string topic_encoding_s = topic_info.encoding; | |
std::string const topic_encoding_s = topic_info.encoding; |
if(ret) | ||
{ | ||
std::string topic_desc_s = topic_info.descriptor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'topic_desc_s' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness]
std::string topic_desc_s = topic_info.descriptor; | |
std::string const topic_desc_s = topic_info.descriptor; |
#define NET_UDP_MULTICAST_PORT_SAMPLE_OFF 2 | ||
#define NET_UDP_MULTICAST_PORT_LOG_OFF 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: macro 'NET_UDP_MULTICAST_PORT_LOG_OFF' defines an integral constant; prefer an enum instead [modernize-macro-to-enum]
#define NET_UDP_MULTICAST_PORT_LOG_OFF 4
^
#endif | ||
#if ECAL_CORE_SUBSCRIBER | ||
sstream << "------------------------- SUBSCRIPTION LAYER DEFAULTS ------------" << std::endl; | ||
sstream << "Layer Mode UDP MC : " << LayerMode(Config::IsUdpMulticastRecEnabled()) << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: implicit conversion bool -> 'int' [readability-implicit-bool-conversion]
sstream << "Layer Mode UDP MC : " << LayerMode(Config::IsUdpMulticastRecEnabled()) << std::endl; | |
sstream << "Layer Mode UDP MC : " << LayerMode(static_cast<int>(Config::IsUdpMulticastRecEnabled())) << std::endl; |
if(handle_ == NULL) return(0); | ||
eCAL::CSubscriber* sub = static_cast<eCAL::CSubscriber*>(handle_); | ||
if(handle_ == nullptr) return(0); | ||
auto* sub = static_cast<eCAL::CSubscriber*>(handle_); | ||
delete sub; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory]
delete sub;
^
Additional context
ecal/core/src/ecalc.cpp:519: variable declared here
auto* sub = static_cast<eCAL::CSubscriber*>(handle_);
^
ecal/core/src/ecalc.cpp
Outdated
{ | ||
if(handle_ == NULL) return(0); | ||
if (handle_ == NULL) return(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: use nullptr [modernize-use-nullptr]
if (handle_ == NULL) return(0); | |
if (handle_ == nullptr) return(0); |
int buffer_len = CopyBuffer(buf_, buf_len_, desc); | ||
if (buffer_len != static_cast<int>(desc.size())) | ||
const eCAL::SDataTypeInformation datatype_info = sub->GetDataTypeInformation(); | ||
int buffer_len = CopyBuffer(buf_, buf_len_, datatype_info.name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'buffer_len' of type 'int' can be declared 'const' [misc-const-correctness]
int buffer_len = CopyBuffer(buf_, buf_len_, datatype_info.name); | |
int const buffer_len = CopyBuffer(buf_, buf_len_, datatype_info.name); |
{ | ||
if (handle_ == NULL) return(0); | ||
eCAL::CSubscriber* sub = static_cast<eCAL::CSubscriber*>(handle_); | ||
return(sub->SetTimeout(timeout_)); | ||
const eCAL::SDataTypeInformation datatype_info = sub->GetDataTypeInformation(); | ||
int buffer_len = CopyBuffer(buf_, buf_len_, datatype_info.encoding); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'buffer_len' of type 'int' can be declared 'const' [misc-const-correctness]
int buffer_len = CopyBuffer(buf_, buf_len_, datatype_info.encoding); | |
int const buffer_len = CopyBuffer(buf_, buf_len_, datatype_info.encoding); |
ecal/core/src/ecalc.cpp
Outdated
{ | ||
if(handle_ == NULL) return(0); | ||
if (handle_ == NULL) return(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: use nullptr [modernize-use-nullptr]
if (handle_ == NULL) return(0); | |
if (handle_ == nullptr) return(0); |
ecal/pb deprecated API removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There were too many comments to post at once. Showing the first 20 out of 217. Check the log or trigger a new build to see more.
@@ -24,6 +24,7 @@ | |||
|
|||
#pragma once | |||
|
|||
#include <cstddef> | |||
#include <ecal/ecal_deprecate.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'ecal/ecal_deprecate.h' file not found [clang-diagnostic-error]
#include <ecal/ecal_deprecate.h>
^
@@ -24,6 +24,7 @@ | |||
|
|||
#pragma once | |||
|
|||
#include <cstddef> | |||
#include <ecal/msg/subscriber.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'ecal/msg/subscriber.h' file not found [clang-diagnostic-error]
#include <ecal/msg/subscriber.h>
^
did = 0; | ||
dclock = 0; | ||
dfreq = 0; | ||
rclock = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'rclock' should be initialized in an in-class default member initializer [cppcoreguidelines-prefer-member-initializer]
rclock = 0; | |
ecal/core/include/ecal/types/monitoring.h:86:
- int32_t rclock; //!< registration clock (heart beat)
+ int32_t rclock{0}; //!< registration clock (heart beat)
dclock = 0; | ||
dfreq = 0; | ||
rclock = 0; | ||
pid = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'pid' should be initialized in an in-class default member initializer [cppcoreguidelines-prefer-member-initializer]
pid = 0; | |
ecal/core/include/ecal/types/monitoring.h:89:
- int32_t pid; //!< process id
+ int32_t pid{0}; //!< process id
dfreq = 0; | ||
rclock = 0; | ||
pid = 0; | ||
tsize = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'tsize' should be initialized in an in-class default member initializer [cppcoreguidelines-prefer-member-initializer]
tsize = 0; | |
ecal/core/include/ecal/types/monitoring.h:98:
- int32_t tsize; //!< topic size
+ int32_t tsize{0}; //!< topic size
if(handle_ == NULL) return(0); | ||
eCAL::CSubscriber* sub = static_cast<eCAL::CSubscriber*>(handle_); | ||
if(handle_ == nullptr) return(0); | ||
auto* sub = static_cast<eCAL::CSubscriber*>(handle_); | ||
delete sub; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory]
delete sub;
^
Additional context
ecal/core/src/ecalc.cpp:524: variable declared here
auto* sub = static_cast<eCAL::CSubscriber*>(handle_);
^
const std::string dump = sub->Dump(); | ||
if(!dump.empty()) | ||
const eCAL::SDataTypeInformation datatype_info = sub->GetDataTypeInformation(); | ||
int buffer_len = CopyBuffer(buf_, buf_len_, datatype_info.descriptor); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'buffer_len' of type 'int' can be declared 'const' [misc-const-correctness]
int buffer_len = CopyBuffer(buf_, buf_len_, datatype_info.descriptor); | |
int const buffer_len = CopyBuffer(buf_, buf_len_, datatype_info.descriptor); |
ecal/core/src/ecalc.cpp
Outdated
@@ -1106,7 +791,7 @@ | |||
|
|||
ECALC_API int eCAL_Timer_Destroy(ECAL_HANDLE handle_) | |||
{ | |||
if(handle_ == NULL) return(0); | |||
if (handle_ == NULL) return(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: use nullptr [modernize-use-nullptr]
if (handle_ == NULL) return(0); | |
if (handle_ == nullptr) return(0); |
ecal/core/src/ecalc.cpp
Outdated
@@ -1115,25 +800,26 @@ | |||
|
|||
ECALC_API int eCAL_Timer_Start(ECAL_HANDLE handle_, int timeout_, TimerCallbackCT callback_, int delay_, void* par_) | |||
{ | |||
if(handle_ == NULL) return(0); | |||
if (handle_ == NULL) return(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: use nullptr [modernize-use-nullptr]
if (handle_ == NULL) return(0); | |
if (handle_ == nullptr) return(0); |
ecal/core/src/ecalc.cpp
Outdated
else return(0); | ||
} | ||
|
||
ECALC_API int eCAL_Timer_Stop(ECAL_HANDLE handle_) | ||
{ | ||
if(handle_ == NULL) return(0); | ||
if (handle_ == NULL) return(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: use nullptr [modernize-use-nullptr]
if (handle_ == NULL) return(0); | |
if (handle_ == nullptr) return(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There were too many comments to post at once. Showing the first 20 out of 215. Check the log or trigger a new build to see more.
@@ -177,23 +177,25 @@ namespace eCAL | |||
{ | |||
SServerMon() | |||
{ | |||
rclock = 0; | |||
pid = 0; | |||
rclock = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'rclock' should be initialized in an in-class default member initializer [cppcoreguidelines-prefer-member-initializer]
rclock = 0; | |
ecal/core/include/ecal/types/monitoring.h:186:
- int32_t rclock; //<! registration clock
+ int32_t rclock{0}; //<! registration clock
rclock = 0; | ||
pid = 0; | ||
rclock = 0; | ||
pid = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'pid' should be initialized in an in-class default member initializer [cppcoreguidelines-prefer-member-initializer]
pid = 0; | |
ecal/core/include/ecal/types/monitoring.h:190:
- int32_t pid; //<! process id
+ int32_t pid{0}; //<! process id
pid = 0; | ||
rclock = 0; | ||
pid = 0; | ||
version = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'version' should be initialized in an in-class default member initializer [cppcoreguidelines-prefer-member-initializer]
version = 0; | |
ecal/core/include/ecal/types/monitoring.h:195:
- uint32_t version; //<! service protocol version
+ uint32_t version{0}; //<! service protocol version
@@ -202,23 +204,26 @@ | |||
{ | |||
SClientMon() | |||
{ | |||
rclock = 0; | |||
pid = 0; | |||
rclock = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'rclock' should be initialized in an in-class default member initializer [cppcoreguidelines-prefer-member-initializer]
rclock = 0; | |
ecal/core/include/ecal/types/monitoring.h:211:
- int32_t rclock; //<! registration clock
+ int32_t rclock{0}; //<! registration clock
rclock = 0; | ||
pid = 0; | ||
rclock = 0; | ||
pid = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'pid' should be initialized in an in-class default member initializer [cppcoreguidelines-prefer-member-initializer]
pid = 0; | |
ecal/core/include/ecal/types/monitoring.h:215:
- int32_t pid; //<! process id
+ int32_t pid{0}; //<! process id
@@ -768,7 +620,7 @@ | |||
/****************************************/ | |||
ECAL_API ECAL_HANDLE client_create(const char* service_name_) | |||
{ | |||
eCAL::CServiceClient* client = new eCAL::CServiceClient; | |||
auto* client = new eCAL::CServiceClient; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: initializing non-owner 'eCAL::CServiceClient *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory]
auto* client = new eCAL::CServiceClient;
^
@@ -768,7 +620,7 @@ | |||
/****************************************/ | |||
ECAL_API ECAL_HANDLE client_create(const char* service_name_) | |||
{ | |||
eCAL::CServiceClient* client = new eCAL::CServiceClient; | |||
auto* client = new eCAL::CServiceClient; | |||
if (!client->Create(service_name_)) | |||
{ | |||
delete client; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory]
delete client;
^
Additional context
ecal/core/src/ecal_clang.cpp:622: variable declared here
auto* client = new eCAL::CServiceClient;
^
@@ -782,11 +634,10 @@ | |||
/****************************************/ | |||
ECAL_API bool client_destroy(ECAL_HANDLE handle_) | |||
{ | |||
eCAL::CServiceClient* client = static_cast<eCAL::CServiceClient*>(handle_); | |||
auto* client = static_cast<eCAL::CServiceClient*>(handle_); | |||
if (client != nullptr) | |||
{ | |||
delete client; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory]
delete client;
^
Additional context
ecal/core/src/ecal_clang.cpp:636: variable declared here
auto* client = static_cast<eCAL::CServiceClient*>(handle_);
^
if (handle_ == NULL) return(0); | ||
eCAL::CPublisher* pub = static_cast<eCAL::CPublisher*>(handle_); | ||
if (handle_ == nullptr) return(0); | ||
auto* pub = static_cast<eCAL::CPublisher*>(handle_); | ||
delete pub; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory]
delete pub;
^
Additional context
ecal/core/src/ecalc.cpp:376: variable declared here
auto* pub = static_cast<eCAL::CPublisher*>(handle_);
^
if(handle_ == NULL) return(0); | ||
eCAL::CSubscriber* sub = static_cast<eCAL::CSubscriber*>(handle_); | ||
if(handle_ == nullptr) return(0); | ||
auto* sub = static_cast<eCAL::CSubscriber*>(handle_); | ||
delete sub; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: deleting a pointer through a type that is not marked 'gsl::owner<>'; consider using a smart pointer instead [cppcoreguidelines-owning-memory]
delete sub;
^
Additional context
ecal/core/src/ecalc.cpp:523: variable declared here
auto* sub = static_cast<eCAL::CSubscriber*>(handle_);
^
Description
Synched with https://github.com/eclipse-ecal/ecal-core. Will never be merged, just to compare changes to master.