Skip to content
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
20 changes: 12 additions & 8 deletions controller_interface/test/test_chainable_controller_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ TEST_F(ChainableControllerInterfaceTest, export_state_interfaces_list_only)
ASSERT_TRUE(
controller.exported_state_interfaces_.find("testable_chainable_controller/test_state_ptr") !=
controller.exported_state_interfaces_.end());
controller.exported_state_interfaces_.at("testable_chainable_controller/test_state_ptr")
->set_value(EXPORTED_STATE_INTERFACE_VALUE);
std::ignore =
controller.exported_state_interfaces_.at("testable_chainable_controller/test_state_ptr")
->set_value(EXPORTED_STATE_INTERFACE_VALUE);
EXPECT_EQ(exported_state_interfaces[0]->get_optional().value(), EXPORTED_STATE_INTERFACE_VALUE);

// calling export_state_interfaces again should return the same interface and shouldn't throw
Expand Down Expand Up @@ -134,8 +135,9 @@ TEST_F(ChainableControllerInterfaceTest, export_state_interfaces_list_plus_legac
ASSERT_TRUE(
controller.exported_state_interfaces_.find("testable_chainable_controller/test_state_ptr") !=
controller.exported_state_interfaces_.end());
controller.exported_state_interfaces_.at("testable_chainable_controller/test_state_ptr")
->set_value(EXPORTED_STATE_INTERFACE_VALUE);
std::ignore =
controller.exported_state_interfaces_.at("testable_chainable_controller/test_state_ptr")
->set_value(EXPORTED_STATE_INTERFACE_VALUE);
EXPECT_EQ(exported_state_interfaces[0]->get_optional().value(), EXPORTED_STATE_INTERFACE_VALUE);

// calling export_state_interfaces again should return the same interface and shouldn't throw
Expand Down Expand Up @@ -203,8 +205,9 @@ TEST_F(ChainableControllerInterfaceTest, export_reference_interfaces_list_only)
ASSERT_TRUE(
controller.exported_reference_interfaces_.find("testable_chainable_controller/test_itf_ptr") !=
controller.exported_reference_interfaces_.end());
controller.exported_reference_interfaces_.at("testable_chainable_controller/test_itf_ptr")
->set_value(INTERFACE_VALUE);
std::ignore =
controller.exported_reference_interfaces_.at("testable_chainable_controller/test_itf_ptr")
->set_value(INTERFACE_VALUE);
EXPECT_EQ(reference_interfaces[0]->get_optional().value(), INTERFACE_VALUE);

// calling export_reference_interfaces again should return the same interface and shouldn't throw
Expand Down Expand Up @@ -246,8 +249,9 @@ TEST_F(ChainableControllerInterfaceTest, export_reference_interfaces_list_plus_l
ASSERT_TRUE(
controller.exported_reference_interfaces_.find("testable_chainable_controller/test_itf_ptr") !=
controller.exported_reference_interfaces_.end());
controller.exported_reference_interfaces_.at("testable_chainable_controller/test_itf_ptr")
->set_value(INTERFACE_VALUE);
std::ignore =
controller.exported_reference_interfaces_.at("testable_chainable_controller/test_itf_ptr")
->set_value(INTERFACE_VALUE);
EXPECT_EQ(reference_interfaces[0]->get_optional().value(), INTERFACE_VALUE);

// calling export_reference_interfaces again should return the same interface and shouldn't throw
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ controller_interface::return_type TestChainableController::update_and_write_comm
// If there is a command interface then integrate and set it to the exported state interface data
for (size_t i = 0; i < state_interfaces_to_export_.size() && i < command_interfaces_.size(); ++i)
{
ordered_exported_state_interfaces_[i]->set_value(
std::ignore = ordered_exported_state_interfaces_[i]->set_value(
command_interfaces_[i].get_optional().value() * CONTROLLER_DT);
}
// If there is no command interface and if there is a state interface then just forward the same
Expand All @@ -157,7 +157,8 @@ controller_interface::return_type TestChainableController::update_and_write_comm
command_interfaces_.empty();
++i)
{
ordered_exported_state_interfaces_[i]->set_value(state_interfaces_[i].get_optional().value());
std::ignore =
ordered_exported_state_interfaces_[i]->set_value(state_interfaces_[i].get_optional().value());
}

return update_return_value;
Expand Down
8 changes: 0 additions & 8 deletions hardware_interface/include/hardware_interface/handle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -722,11 +722,7 @@ class StateInterface : public Handle

StateInterface(StateInterface && other) = default;

// Disable deprecated warnings
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
using Handle::Handle;
#pragma GCC diagnostic pop

using SharedPtr = std::shared_ptr<StateInterface>;
using ConstSharedPtr = std::shared_ptr<const StateInterface>;
Expand Down Expand Up @@ -814,11 +810,7 @@ class CommandInterface : public Handle
}
}

// Disable deprecated warnings
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
using Handle::Handle;
#pragma GCC diagnostic pop

using SharedPtr = std::shared_ptr<CommandInterface>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ class LoanedCommandInterface

protected:
CommandInterface & command_interface_;
Deleter deleter_;
std::string interface_name_;
Deleter deleter_;

private:
struct HandleRTStatistics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ class LoanedStateInterface

protected:
const StateInterface & state_interface_;
Deleter deleter_;
std::string interface_name_;
Deleter deleter_;

private:
struct HandleRTStatistics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@
#include "hardware_interface/actuator.hpp"
#include "hardware_interface/hardware_component_info.hpp"
#include "hardware_interface/hardware_info.hpp"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#include "hardware_interface/loaned_command_interface.hpp"
#include "hardware_interface/loaned_state_interface.hpp"
#pragma GCC diagnostic pop
#include "hardware_interface/sensor.hpp"
#include "hardware_interface/system.hpp"
#include "hardware_interface/system_interface.hpp"
Expand Down
4 changes: 0 additions & 4 deletions hardware_interface/include/mock_components/generic_system.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@

#include <string>
#include <vector>

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#include "hardware_interface/handle.hpp"
#pragma GCC diagnostic pop
#include "hardware_interface/hardware_info.hpp"
#include "hardware_interface/system_interface.hpp"
#include "hardware_interface/types/hardware_interface_return_values.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@
#include <vector>

#include "gmock/gmock.h"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#include "hardware_interface/loaned_command_interface.hpp"
#include "hardware_interface/loaned_state_interface.hpp"
#pragma GCC diagnostic pop
#include "hardware_interface/resource_manager.hpp"
#include "hardware_interface/types/lifecycle_state_names.hpp"
#include "lifecycle_msgs/msg/state.hpp"
Expand Down
Loading
Loading