Commits

Anonymous committed e2748bd

cmcfixes76: #i112656# fix up windows casts

Comments (0)

Files changed (1)

sal/osl/w32/process.cxx

 
 oslProcessError SAL_CALL osl_setEnvironment(rtl_uString *ustrVar, rtl_uString *ustrValue)
 {
-    if (SetEnvironmentVariableW(ustrVar->buffer, ustrValue->buffer))
+    LPCWSTR lpName = reinterpret_cast<LPCWSTR>(ustrVar->buffer);
+    LPCWSTR lpValue = reinterpret_cast<LPCWSTR>(ustrValue->buffer);
+    if (SetEnvironmentVariableW(lpName, lpValue))
         return osl_Process_E_None;
     return osl_Process_E_Unknown;
 }
 {
     //If the second parameter is NULL, the variable is deleted from the current
     //process's environment.
-    if (SetEnvironmentVariableW(ustrVar->buffer, NULL))
+    LPCWSTR lpName = reinterpret_cast<LPCWSTR>(ustrVar->buffer);
+    if (SetEnvironmentVariableW(lpName, NULL))
         return osl_Process_E_None;
     return osl_Process_E_Unknown;
 }