[WinCairo][Clang] DLLLauncherMain.cpp: warning: unused function 'prependPath' and...
authorHironori.Fujii@sony.com <Hironori.Fujii@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2018 07:54:59 +0000 (07:54 +0000)
committerHironori.Fujii@sony.com <Hironori.Fujii@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2018 07:54:59 +0000 (07:54 +0000)
https://bugs.webkit.org/show_bug.cgi?id=192688

Reviewed by Ross Kirsling.

Source/JavaScriptCore:

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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239200 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/shell/DLLLauncherMain.cpp
Tools/ChangeLog
Tools/win/DLLLauncher/DLLLauncherMain.cpp

index 3fc73c7..9bd2412 100644 (file)
@@ -1,3 +1,19 @@
+2018-12-13  Fujii Hironori  <Hironori.Fujii@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  <dinfuehr@igalia.com>
 
         Improve GDB output for LLInt on Linux
index 33633c3..b9a5d01 100644 (file)
@@ -56,6 +56,18 @@ static void enableTerminationOnHeapCorruption()
     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 @@ static std::wstring appleApplicationSupportDirectory()
     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 @@ static bool prependPath(const std::wstring& directoryToPrepend)
     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)
 {
index 9078ea1..53567cd 100644 (file)
@@ -1,3 +1,17 @@
+2018-12-13  Fujii Hironori  <Hironori.Fujii@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.olmstead@sony.com>
 
         Unreviewed. Changed my status to a reviewer.
index 1d22daa..14e6b23 100644 (file)
@@ -55,6 +55,18 @@ static void enableTerminationOnHeapCorruption()
     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 @@ static wstring appleApplicationSupportDirectory()
     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 @@ static bool prependPath(const wstring& directoryToPrepend)
     wstring newPath = directoryToPrepend + L';' + oldPath;
     return ::SetEnvironmentVariableW(pathVariable.c_str(), newPath.c_str());
 }
+#endif
 
 static int fatalError(const wstring& programName, const wstring& message)
 {