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

Fix two code-analyser bugs #282

Open
wants to merge 1 commit into
base: noetic-devel
Choose a base branch
from
Open
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
9 changes: 3 additions & 6 deletions diagnostic_aggregator/src/aggregator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,9 @@ void Aggregator::checkTimestamp(const diagnostic_msgs::DiagnosticArray::ConstPtr
stamp_warn += ", ";
stamp_warn += it->name;
}

if (!ros_warnings_.count(stamp_warn))
{
ROS_WARN("%s", stamp_warn.c_str());
ros_warnings_.insert(stamp_warn);
}

auto result = ros_warnings_.insert(stamp_warn);
ROS_WARN_COND(result.second, "%s", stamp_warn.c_str());
}

void Aggregator::diagCallback(const diagnostic_msgs::DiagnosticArray::ConstPtr& diag_msg)
Expand Down
1 change: 0 additions & 1 deletion diagnostic_aggregator/src/aggregator_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,5 @@ int main(int argc, char **argv)
}

exit(0);
return 0;
}