From 65fd2fc2616552e4204223b7c2b69d9bc87c1f2d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 7 Aug 2007 22:39:29 +0000 Subject: [PATCH] correction to last commit: don't test unsetenv() return value, it's void under Darwin git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/unix/utilsunx.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/unix/utilsunx.cpp b/src/unix/utilsunx.cpp index dffddb191a..83f9195503 100644 --- a/src/unix/utilsunx.cpp +++ b/src/unix/utilsunx.cpp @@ -1101,7 +1101,10 @@ static bool wxDoSetEnv(const wxString& variable, const char *value) if ( !value ) { #ifdef HAVE_UNSETENV - return unsetenv(variable.mb_str()) == 0; + // don't test unsetenv() return value: it's void on some systems (at + // least Darwin) + unsetenv(variable.mb_str()); + return; #else value = ""; // we can't pass NULL to setenv() #endif -- 2.45.2