Title: [239200] trunk
Revision
239200
Author
hironori.fu...@sony.com
Date
2018-12-13 23:54:59 -0800 (Thu, 13 Dec 2018)

Log Message

[WinCairo][Clang] DLLLauncherMain.cpp: warning: unused function 'prependPath' and 'appleApplicationSupportDirectory'
https://bugs.webkit.org/show_bug.cgi?id=192688

Reviewed by Ross Kirsling.

Source/_javascript_Core:

These functions are used only in AppleWin port.

* shell/DLLLauncherMain.cpp:
(copyEnvironmentVariable): Moved.
(getStringValue): Enclosed with #if !defined(WIN_CAIRO).
(applePathFromRegistry): Ditto.
(appleApplicationSupportDirectory): Ditto.
(prependPath): Ditto.

Tools:

* win/DLLLauncher/DLLLauncherMain.cpp:
(copyEnvironmentVariable): Moved.
(getStringValue): Enclosed with #if !defined(WIN_CAIRO).
(applePathFromRegistry): Ditto.
(appleApplicationSupportDirectory): Ditto.
(prependPath): Ditto.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (239199 => 239200)


--- trunk/Source/_javascript_Core/ChangeLog	2018-12-14 07:17:32 UTC (rev 239199)
+++ trunk/Source/_javascript_Core/ChangeLog	2018-12-14 07:54:59 UTC (rev 239200)
@@ -1,3 +1,19 @@
+2018-12-13  Fujii Hironori  <hironori.fu...@sony.com>
+
+        [WinCairo][Clang] DLLLauncherMain.cpp: warning: unused function 'prependPath' and 'appleApplicationSupportDirectory'
+        https://bugs.webkit.org/show_bug.cgi?id=192688
+
+        Reviewed by Ross Kirsling.
+
+        These functions are used only in AppleWin port.
+
+        * shell/DLLLauncherMain.cpp:
+        (copyEnvironmentVariable): Moved.
+        (getStringValue): Enclosed with #if !defined(WIN_CAIRO).
+        (applePathFromRegistry): Ditto.
+        (appleApplicationSupportDirectory): Ditto.
+        (prependPath): Ditto.
+
 2018-12-13  Dominik Infuehr  <dinfu...@igalia.com>
 
         Improve GDB output for LLInt on Linux

Modified: trunk/Source/_javascript_Core/shell/DLLLauncherMain.cpp (239199 => 239200)


--- trunk/Source/_javascript_Core/shell/DLLLauncherMain.cpp	2018-12-14 07:17:32 UTC (rev 239199)
+++ trunk/Source/_javascript_Core/shell/DLLLauncherMain.cpp	2018-12-14 07:54:59 UTC (rev 239200)
@@ -56,6 +56,18 @@
     HeapSetInformation(0, heapEnableTerminationOnCorruption, 0, 0);
 }
 
+static std::wstring copyEnvironmentVariable(const std::wstring& variable)
+{
+    DWORD length = ::GetEnvironmentVariableW(variable.c_str(), 0, 0);
+    if (!length)
+        return std::wstring();
+    std::vector<wchar_t> buffer(length);
+    if (!GetEnvironmentVariable(variable.c_str(), &buffer[0], buffer.size()) || !buffer[0])
+        return std::wstring();
+    return &buffer[0];
+}
+
+#if !defined(WIN_CAIRO)
 static std::wstring getStringValue(HKEY key, const std::wstring& valueName)
 {
     DWORD type = 0;
@@ -85,17 +97,6 @@
     return applePathFromRegistry(L"SOFTWARE\\Apple Inc.\\Apple Application Support", L"InstallDir");
 }
 
-static std::wstring copyEnvironmentVariable(const std::wstring& variable)
-{
-    DWORD length = ::GetEnvironmentVariableW(variable.c_str(), 0, 0);
-    if (!length)
-        return std::wstring();
-    std::vector<wchar_t> buffer(length);
-    if (!GetEnvironmentVariable(variable.c_str(), &buffer[0], buffer.size()) || !buffer[0])
-        return std::wstring();
-    return &buffer[0];
-}
-
 static bool prependPath(const std::wstring& directoryToPrepend)
 {
     std::wstring pathVariable = L"PATH";
@@ -103,6 +104,7 @@
     std::wstring newPath = directoryToPrepend + L';' + oldPath;
     return ::SetEnvironmentVariableW(pathVariable.c_str(), newPath.c_str());
 }
+#endif
 
 static int fatalError(const std::wstring& programName, const std::wstring& message)
 {

Modified: trunk/Tools/ChangeLog (239199 => 239200)


--- trunk/Tools/ChangeLog	2018-12-14 07:17:32 UTC (rev 239199)
+++ trunk/Tools/ChangeLog	2018-12-14 07:54:59 UTC (rev 239200)
@@ -1,3 +1,17 @@
+2018-12-13  Fujii Hironori  <hironori.fu...@sony.com>
+
+        [WinCairo][Clang] DLLLauncherMain.cpp: warning: unused function 'prependPath' and 'appleApplicationSupportDirectory'
+        https://bugs.webkit.org/show_bug.cgi?id=192688
+
+        Reviewed by Ross Kirsling.
+
+        * win/DLLLauncher/DLLLauncherMain.cpp:
+        (copyEnvironmentVariable): Moved.
+        (getStringValue): Enclosed with #if !defined(WIN_CAIRO).
+        (applePathFromRegistry): Ditto.
+        (appleApplicationSupportDirectory): Ditto.
+        (prependPath): Ditto.
+
 2018-12-13  Don Olmstead  <don.olmst...@sony.com>
 
         Unreviewed. Changed my status to a reviewer.

Modified: trunk/Tools/win/DLLLauncher/DLLLauncherMain.cpp (239199 => 239200)


--- trunk/Tools/win/DLLLauncher/DLLLauncherMain.cpp	2018-12-14 07:17:32 UTC (rev 239199)
+++ trunk/Tools/win/DLLLauncher/DLLLauncherMain.cpp	2018-12-14 07:54:59 UTC (rev 239200)
@@ -55,6 +55,18 @@
     HeapSetInformation(0, heapEnableTerminationOnCorruption, 0, 0);
 }
 
+static wstring copyEnvironmentVariable(const wstring& variable)
+{
+    DWORD length = ::GetEnvironmentVariableW(variable.c_str(), 0, 0);
+    if (!length)
+        return wstring();
+    vector<wchar_t> buffer(length);
+    if (!GetEnvironmentVariable(variable.c_str(), &buffer[0], buffer.size()) || !buffer[0])
+        return wstring();
+    return &buffer[0];
+}
+
+#if !defined(WIN_CAIRO)
 static wstring getStringValue(HKEY key, const wstring& valueName)
 {
     DWORD type = 0;
@@ -84,17 +96,6 @@
     return applePathFromRegistry(L"SOFTWARE\\Apple Inc.\\Apple Application Support", L"InstallDir");
 }
 
-static wstring copyEnvironmentVariable(const wstring& variable)
-{
-    DWORD length = ::GetEnvironmentVariableW(variable.c_str(), 0, 0);
-    if (!length)
-        return wstring();
-    vector<wchar_t> buffer(length);
-    if (!GetEnvironmentVariable(variable.c_str(), &buffer[0], buffer.size()) || !buffer[0])
-        return wstring();
-    return &buffer[0];
-}
-
 static bool prependPath(const wstring& directoryToPrepend)
 {
     wstring pathVariable = L"PATH";
@@ -102,6 +103,7 @@
     wstring newPath = directoryToPrepend + L';' + oldPath;
     return ::SetEnvironmentVariableW(pathVariable.c_str(), newPath.c_str());
 }
+#endif
 
 static int fatalError(const wstring& programName, const wstring& message)
 {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to