Skip to content

Commit

Permalink
Fix build warnings (#73)
Browse files Browse the repository at this point in the history
**Public-Facing Changes**
None


**Description**
Fixes `unused variable` build warnings
  • Loading branch information
achim-k committed Nov 28, 2022
1 parent 95d4791 commit 2d524d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ inline void Server<ServerConfiguration>::handleConnectionOpened(ConnHandle hdl)

json channels;
for (const auto& [id, channel] : _channels) {
(void)id;
channels.push_back(channel);
}
sendJson(hdl, {
Expand Down Expand Up @@ -359,6 +360,7 @@ inline void Server<ServerConfiguration>::handleConnectionClosed(ConnHandle hdl)
// Unsubscribe all channels this client subscribed to
if (_unsubscribeHandler) {
for (const auto& [chanId, subs] : oldSubscriptionsByChannel) {
(void)subs;
_unsubscribeHandler(chanId, hdl);
}
}
Expand Down Expand Up @@ -414,6 +416,7 @@ inline void Server<ServerConfiguration>::stop() {
std::unique_lock<std::shared_mutex> lock(_clientsChannelMutex);
connections.reserve(_clients.size());
for (const auto& [hdl, client] : _clients) {
(void)client;
if (auto connection = _server.get_con_from_hdl(hdl, ec)) {
connections.push_back(connection);
}
Expand Down Expand Up @@ -765,11 +768,13 @@ inline void Server<ServerConfiguration>::broadcastChannels() {

json channels;
for (const auto& [id, channel] : _channels) {
(void)id;
channels.push_back(channel);
}
std::string msg = json{{"op", "advertise"}, {"channels", std::move(channels)}}.dump();

for (const auto& [hdl, clientInfo] : _clients) {
(void)clientInfo;
sendJsonRaw(hdl, msg);
}
}
Expand Down
1 change: 1 addition & 0 deletions ros1_foxglove_bridge/src/ros1_foxglove_bridge_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ class FoxgloveBridge : public nodelet::Nodelet {
// Create a list of topics that have been removed
std::vector<TopicAndDatatype> removedTopics;
for (const auto& [topic, channel] : _advertisedTopics) {
(void)channel;
if (latestTopics.find(topic) == latestTopics.end()) {
removedTopics.push_back(topic);
}
Expand Down

0 comments on commit 2d524d4

Please sign in to comment.