Skip to content

Commit 64692db

Browse files
authored
Suppress warning (#679)
Signed-off-by: Alejandro Hernandez Cordero <[email protected]>
1 parent 7550a71 commit 64692db

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

gz_ros2_control/src/gz_system.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,12 +578,24 @@ void GazeboSimSystem::registerSensors(
578578
CallbackReturn
579579
GazeboSimSystem::on_init(const hardware_interface::HardwareInfo & info)
580580
{
581+
#ifdef _MSC_VER
582+
#pragma warning(push)
583+
#pragma warning(disable : 4996)
584+
#else
585+
#pragma GCC diagnostic push
586+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
587+
#endif
581588
if (hardware_interface::SystemInterface::on_init(info) !=
582589
CallbackReturn::SUCCESS)
583590
{
584591
return CallbackReturn::ERROR;
585592
}
586593
return CallbackReturn::SUCCESS;
594+
#ifdef _MSC_VER
595+
#pragma warning(pop)
596+
#else
597+
#pragma GCC diagnostic pop
598+
#endif
587599
}
588600

589601
CallbackReturn

0 commit comments

Comments
 (0)