Skip to content
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

several compiler warnings fixed #1264

Merged
merged 4 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/mon/mon_tui/src/tui/view/component/data_table.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,9 @@ class TypedTableModelBase : public TableModelBase
return visible_data[0].rows.size();
}

return std::accumulate(visible_data.begin(), visible_data.end(), 0,
return std::accumulate(visible_data.begin(), visible_data.end(), std::size_t{ 0 },
[](auto val, auto &group) {
return group.rows.size() + val + 1;
return size_t(group.rows.size() + val + 1);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,18 +157,18 @@ void JobHistoryModel::setRecorderStatuses(const eCAL::rec_server::RecorderStatus

if (hdf5_recorder_item == nullptr) continue;

bool update_needed = false;
update_needed = update_needed || hdf5_recorder_item->updateStillOnline (recorder_still_online);
update_needed = update_needed || hdf5_recorder_item->updatePid (pid);
update_needed = update_needed || hdf5_recorder_item->updateInfoLastCommandResponse(client_job_status.second.info_last_command_response_);
update_needed = update_needed || hdf5_recorder_item->updateLength ({ client_job_status.second.job_status_.rec_hdf5_status_.total_length_, client_job_status.second.job_status_.rec_hdf5_status_.total_frame_count_ });
update_needed = update_needed || hdf5_recorder_item->updateUnflushedFrameCount (client_job_status.second.job_status_.rec_hdf5_status_.unflushed_frame_count_);
update_needed = update_needed || hdf5_recorder_item->updateState (client_job_status.second.job_status_.state_);
update_needed = update_needed || hdf5_recorder_item->updateUploadStatus (client_job_status.second.job_status_.upload_status_);
update_needed = update_needed || hdf5_recorder_item->updateInfo (client_job_status.second.job_status_.rec_hdf5_status_.info_);
update_needed = update_needed || hdf5_recorder_item->updateIsDeleted (is_deleted);

if (update_needed)
bool update_needed_hdf5_rec = false;
update_needed_hdf5_rec = update_needed_hdf5_rec || hdf5_recorder_item->updateStillOnline (recorder_still_online);
update_needed_hdf5_rec = update_needed_hdf5_rec || hdf5_recorder_item->updatePid (pid);
update_needed_hdf5_rec = update_needed_hdf5_rec || hdf5_recorder_item->updateInfoLastCommandResponse(client_job_status.second.info_last_command_response_);
update_needed_hdf5_rec = update_needed_hdf5_rec || hdf5_recorder_item->updateLength ({ client_job_status.second.job_status_.rec_hdf5_status_.total_length_, client_job_status.second.job_status_.rec_hdf5_status_.total_frame_count_ });
update_needed_hdf5_rec = update_needed_hdf5_rec || hdf5_recorder_item->updateUnflushedFrameCount (client_job_status.second.job_status_.rec_hdf5_status_.unflushed_frame_count_);
update_needed_hdf5_rec = update_needed_hdf5_rec || hdf5_recorder_item->updateState (client_job_status.second.job_status_.state_);
update_needed_hdf5_rec = update_needed_hdf5_rec || hdf5_recorder_item->updateUploadStatus (client_job_status.second.job_status_.upload_status_);
update_needed_hdf5_rec = update_needed_hdf5_rec || hdf5_recorder_item->updateInfo (client_job_status.second.job_status_.rec_hdf5_status_.info_);
update_needed_hdf5_rec = update_needed_hdf5_rec || hdf5_recorder_item->updateIsDeleted (is_deleted);

if (update_needed_hdf5_rec)
{
items_to_update.insert(hdf5_recorder_item);
items_to_update.insert(job_item); // Also update the parent, as it accumulates its information from the children
Expand Down Expand Up @@ -215,16 +215,16 @@ void JobHistoryModel::setRecorderStatuses(const eCAL::rec_server::RecorderStatus
}) != recorder_status_it->second.first.addon_statuses_.end();
}

bool update_needed = false;
update_needed = update_needed || addon_item->updateStillOnline (addon_still_online);
update_needed = update_needed || addon_item->updatePid (pid);
update_needed = update_needed || addon_item->updateLength ({ std::chrono::steady_clock::duration(0), addon_id_status_pair.second.total_frame_count_ });
update_needed = update_needed || addon_item->updateUnflushedFrameCount(addon_id_status_pair.second.unflushed_frame_count_);
update_needed = update_needed || addon_item->updateState (addon_state);
update_needed = update_needed || addon_item->updateInfo (addon_id_status_pair.second.info_);
update_needed = update_needed || addon_item->updateIsDeleted (is_deleted);
bool update_needed_addon = false;
update_needed_addon = update_needed_addon || addon_item->updateStillOnline (addon_still_online);
update_needed_addon = update_needed_addon || addon_item->updatePid (pid);
update_needed_addon = update_needed_addon || addon_item->updateLength ({std::chrono::steady_clock::duration(0), addon_id_status_pair.second.total_frame_count_ });
update_needed_addon = update_needed_addon || addon_item->updateUnflushedFrameCount(addon_id_status_pair.second.unflushed_frame_count_);
update_needed_addon = update_needed_addon || addon_item->updateState (addon_state);
update_needed_addon = update_needed_addon || addon_item->updateInfo (addon_id_status_pair.second.info_);
update_needed_addon = update_needed_addon || addon_item->updateIsDeleted (is_deleted);

if (update_needed)
if (update_needed_addon)
{
items_to_update.insert(addon_item);
items_to_update.insert(job_item); // Also update the parent, as it accumulates its information from the children
Expand Down
2 changes: 1 addition & 1 deletion app/rec/rec_server_core/src/rec_server_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ namespace eCAL
job.can_upload_ = true;
else
job.can_upload_ = false;
result = SimulateAddComment_NoLock(job, job.local_evaluated_job_config_.GetJobId());
result = SimulateAddComment_NoLock(job, static_cast<int>(job.local_evaluated_job_config_.GetJobId()));
if (result == eCAL::rec::Error(eCAL::rec::Error::OK))
job.can_comment_ = true;
else
Expand Down
2 changes: 1 addition & 1 deletion ecal/core/include/ecal/ecal_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

/**
* @file
* @file ecal_util.h
* @brief eCAL utility interface
**/

Expand Down
12 changes: 6 additions & 6 deletions lang/csharp/Continental/eCAL/Core/ecal_clr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ std::string ByteArrayToStlString(array<Byte>^ array_)

array<Byte>^ StlStringToByteArray(const std::string& string_)
{
array<Byte>^ array_ = gcnew array<Byte>(string_.size());
System::Runtime::InteropServices::Marshal::Copy(IntPtr((void*)(string_.data())), array_, 0, string_.size());
array<Byte>^ array_ = gcnew array<Byte>(static_cast<int>(string_.size()));
System::Runtime::InteropServices::Marshal::Copy(IntPtr((void*)(string_.data())), array_, 0, static_cast<int>(string_.size()));
return(array_);
}
/////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -627,17 +627,17 @@ array<Byte>^ Monitoring::GetMonitoringBytes()
{
std::string monitoring;
::eCAL::Monitoring::GetMonitoring(monitoring);
array<Byte>^ data = gcnew array<Byte>(monitoring.size());
System::Runtime::InteropServices::Marshal::Copy(IntPtr(&monitoring[0]), data, 0, monitoring.size());
array<Byte>^ data = gcnew array<Byte>(static_cast<int>(monitoring.size()));
System::Runtime::InteropServices::Marshal::Copy(IntPtr(&monitoring[0]), data, 0, static_cast<int>(monitoring.size()));
return data;
}

array<Byte>^ Monitoring::GetLoggingBytes()
{
std::string logging;
::eCAL::Monitoring::GetLogging(logging);
array<Byte>^ data = gcnew array<Byte>(logging.size());
System::Runtime::InteropServices::Marshal::Copy(IntPtr(&logging[0]), data, 0, logging.size());
array<Byte>^ data = gcnew array<Byte>(static_cast<int>(logging.size()));
System::Runtime::InteropServices::Marshal::Copy(IntPtr(&logging[0]), data, 0, static_cast<int>(logging.size()));
return data;
}

Expand Down
2 changes: 1 addition & 1 deletion lang/python/core/src/ecal_wrap.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ PyObject* sub_receive(PyObject* /*self*/, PyObject* args)
/****************************************/
/* sub_set_callback */
/****************************************/
static void c_subscriber_callback(const char* topic_name_, const struct eCAL::SReceiveCallbackData* data_, ECAL_HANDLE handle_, const std::string& python_formatter)
static void c_subscriber_callback(const char* topic_name_, const struct eCAL::SReceiveCallbackData* data_, ECAL_HANDLE handle_, const std::string& /*python_formatter*/)
{
#if ECAL_PY_INIT_THREADS_NEEDED
if (!g_pygil_init)
Expand Down
Loading