From 29a2484e3d59deacedc4ddd955c6da8fa47c3b2a Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Tue, 12 Sep 2023 09:42:16 +0200 Subject: [PATCH] Refs #19429. Fix linux build. Signed-off-by: Miguel Company --- test/unittest/xmlparser/XMLElementParserTests.cpp | 4 ++-- test/unittest/xmlparser/XMLProfileParserTests.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/unittest/xmlparser/XMLElementParserTests.cpp b/test/unittest/xmlparser/XMLElementParserTests.cpp index 31af7e2ff52..9e16d7fedcf 100644 --- a/test/unittest/xmlparser/XMLElementParserTests.cpp +++ b/test/unittest/xmlparser/XMLElementParserTests.cpp @@ -668,7 +668,7 @@ TEST_F(XMLParserTests, getXMLPropertiesPolicy) EXPECT_EQ(property_policy.binary_properties()[0].value(), std::vector({0x01, 0x02, 0xCA, 0xFE})); EXPECT_EQ(property_policy.binary_properties()[0].propagate(), false); - for (int i = 0; i < valid_parameters.size(); i++) + for (size_t i = 0; i < valid_parameters.size(); i++) { parameters = valid_parameters; parameters[i] = wrong_parameters[i]; @@ -3913,7 +3913,7 @@ static void set_environment_variable( #ifdef _WIN32 ASSERT_EQ(0, _putenv_s(env_var, value)); #else - ASSERT_EQ(0, setenv(env_var, value)); + ASSERT_EQ(0, setenv(env_var, value, 1)); #endif // _WIN32 } diff --git a/test/unittest/xmlparser/XMLProfileParserTests.cpp b/test/unittest/xmlparser/XMLProfileParserTests.cpp index c86f4abae2c..ec68d18a961 100644 --- a/test/unittest/xmlparser/XMLProfileParserTests.cpp +++ b/test/unittest/xmlparser/XMLProfileParserTests.cpp @@ -100,7 +100,7 @@ class XMLProfileParserTests : public XMLProfileParserBasicTests, public testing: #ifdef _WIN32 ASSERT_EQ(0, _putenv_s(value.first.c_str(), value.second.c_str())); #else - ASSERT_EQ(0, setenv(value.first.c_str(), value.second.c_str())); + ASSERT_EQ(0, setenv(value.first.c_str(), value.second.c_str(), 1)); #endif // _WIN32 } }