From 4db469737431a6fdd3aa0b18d761e899c314cd7b Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Wed, 9 Jun 2021 00:58:52 +0200 Subject: [PATCH] Use _putenv instead of unsetenv for Windows --- test/integration/sdf_errors.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/integration/sdf_errors.cc b/test/integration/sdf_errors.cc index 008ec4657f..c04c61069d 100644 --- a/test/integration/sdf_errors.cc +++ b/test/integration/sdf_errors.cc @@ -114,7 +114,11 @@ TEST_F(SDFLogsTest, DuplicateSiblingSameTypeDisabled16) setenv("GAZEBO11_BACKWARDS_COMPAT_WARNINGS_ERRORS", "", 1); Load("worlds/test_sdf16_err_sibling_same_type.world"); EXPECT_NO_ERR_IN_LOG(); +#ifdef _WIN32 + _putenv("GAZEBO11_BACKWARDS_COMPAT_WARNINGS_ERRORS"); +#else unsetenv("GAZEBO11_BACKWARDS_COMPAT_WARNINGS_ERRORS"); +#endif } /////////////////////////////////////////////////