Skip to content

Commit

Permalink
cras_cpp_common: Fixed a few printf format issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
peci1 committed Nov 4, 2024
1 parent 749febf commit e157d32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ void FilterChainNodelet<F>::filterFinishedCallback(const F& data, const size_t f
::std::lock_guard<::std::mutex> l(this->filterPublishersMutex);
if (this->filterPublishers.find(name) == this->filterPublishers.end())
{
const auto topicName = ::cras::format("filter%i/%s", filterNum, name.c_str());
const auto topicName = ::cras::format("filter%zu/%s", filterNum, name.c_str());
this->filterPublishers[name] = this->privateNodeHandle.template advertise<F>(topicName, this->publisherQueueSize);
::ros::WallDuration(0.001).sleep();
}
Expand Down Expand Up @@ -400,7 +400,7 @@ void FilterChainDiagnostics<F>::run(::diagnostic_updater::DiagnosticStatusWrappe
else
{
stat.level = ::diagnostic_msgs::DiagnosticStatus::ERROR;
stat.message = ::cras::format("Some filters are failing (processed %lu messages since last update, %ul errors "
stat.message = ::cras::format("Some filters are failing (processed %lu messages since last update, %zu errors "
"encountered)", totalCallbacks, totalFailures);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ inline bool convert(const ::XmlRpc::XmlRpcValue& x, ::std::array<T, N>& v, bool
if (x.size() != N)
{
if (errors != nullptr)
errors->push_back(::cras::format("The array is expected to have %i items, but %i was given.", N, x.size()));
errors->push_back(::cras::format("The array is expected to have %zu items, but %i was given.", N, x.size()));
return false;
}
for (size_t i = 0; i < x.size(); ++i)
Expand Down

0 comments on commit e157d32

Please sign in to comment.