summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-01-11 13:41:01 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-01-11 13:42:41 +0100
commita9d06182f8bc6ad79f72ec3d604d28d232c62ccc (patch)
treee8d659349c5a791ebb55a6d29e413b1e3a3179bb /sal
parent698bdcdb0c87f5e0453c522b64d20fba851ba47a (diff)
loplugin:externvar (clang-cl)
Change-Id: I81877e46cf95dcc7de16b797fca33658036bf9e8
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/w32/dllentry.c3
-rw-r--r--sal/osl/w32/file_url.cxx3
-rw-r--r--sal/osl/w32/file_url.h3
-rw-r--r--sal/osl/w32/path_helper.cxx8
-rw-r--r--sal/osl/w32/process.cxx2
-rw-r--r--sal/osl/w32/procimpl.cxx4
-rw-r--r--sal/osl/w32/socket.cxx2
-rw-r--r--sal/osl/w32/thread.h2
8 files changed, 14 insertions, 13 deletions
diff --git a/sal/osl/w32/dllentry.c b/sal/osl/w32/dllentry.c
index 54133b5ce0f9..355c6b8202f2 100644
--- a/sal/osl/w32/dllentry.c
+++ b/sal/osl/w32/dllentry.c
@@ -34,16 +34,15 @@
#include <osl/mutex.h>
#include <osl/thread.h>
+#include "file_url.h"
#include "rtllifecycle.h"
#include <thread.h>
// externals
-extern DWORD g_dwTLSTextEncodingIndex;
extern CRITICAL_SECTION g_ThreadKeyListCS;
extern oslMutex g_Mutex;
-extern oslMutex g_CurrentDirectoryMutex;
#ifdef __MINGW32__
diff --git a/sal/osl/w32/file_url.cxx b/sal/osl/w32/file_url.cxx
index ca41be65ca01..1a5a188a019c 100644
--- a/sal/osl/w32/file_url.cxx
+++ b/sal/osl/w32/file_url.cxx
@@ -42,8 +42,7 @@
// FileURL functions
-extern "C" oslMutex g_CurrentDirectoryMutex; /* Initialized in dllentry.c */
-oslMutex g_CurrentDirectoryMutex = nullptr;
+oslMutex g_CurrentDirectoryMutex = nullptr; /* Initialized in dllentry.c */
static BOOL IsValidFilePathComponent(
LPCWSTR lpComponent, LPCWSTR *lppComponentEnd, DWORD dwFlags)
diff --git a/sal/osl/w32/file_url.h b/sal/osl/w32/file_url.h
index ccb99fc56b33..29dfa8f461a8 100644
--- a/sal/osl/w32/file_url.h
+++ b/sal/osl/w32/file_url.h
@@ -23,6 +23,7 @@
#include "sal/types.h"
#include "rtl/ustring.h"
#include "osl/file.h"
+#include "osl/mutex.h"
#ifdef _MSC_VER
#pragma warning(push,1)
@@ -81,6 +82,8 @@ oslFileError osl_getFileURLFromSystemPath_ (
rtl_uString ** pstrURL
);
+extern oslMutex g_CurrentDirectoryMutex;
+
#ifdef __cplusplus
}
#endif
diff --git a/sal/osl/w32/path_helper.cxx b/sal/osl/w32/path_helper.cxx
index c778b152270b..132726559385 100644
--- a/sal/osl/w32/path_helper.cxx
+++ b/sal/osl/w32/path_helper.cxx
@@ -83,14 +83,14 @@ void SAL_CALL osl_systemPathRemoveSeparator(/*inout*/ rtl_uString** ppustrPath)
******************************************************************/
// is [A-Za-z]:[/|\]\0
-const sal_Char* LDP = ":";
-const sal_Char* LDP_WITH_BACKSLASH = ":\\";
-const sal_Char* LDP_WITH_SLASH = ":/";
+const sal_Char* const LDP = ":";
+const sal_Char* const LDP_WITH_BACKSLASH = ":\\";
+const sal_Char* const LDP_WITH_SLASH = ":/";
// degenerated case returned by the Windows FileOpen dialog
// when someone enters for instance "x:filename", the Win32
// API accepts this case
-const sal_Char* LDP_WITH_DOT_BACKSLASH = ":.\\";
+const sal_Char* const LDP_WITH_DOT_BACKSLASH = ":.\\";
sal_Int32 osl_systemPathIsLogicalDrivePattern(/*in*/ const rtl_uString* pustrPath)
{
diff --git a/sal/osl/w32/process.cxx b/sal/osl/w32/process.cxx
index 1b08a2455f5e..59268674502d 100644
--- a/sal/osl/w32/process.cxx
+++ b/sal/osl/w32/process.cxx
@@ -436,8 +436,6 @@ oslProcessError SAL_CALL osl_clearEnvironment(rtl_uString *ustrVar)
* Current Working Directory.
***************************************************************************/
-extern "C" oslMutex g_CurrentDirectoryMutex;
-
oslProcessError SAL_CALL osl_getProcessWorkingDir( rtl_uString **pustrWorkingDir )
{
::osl::LongPathBuffer< sal_Unicode > aBuffer( MAX_LONG_PATH );
diff --git a/sal/osl/w32/procimpl.cxx b/sal/osl/w32/procimpl.cxx
index c9883806c2cf..738b10e07cdd 100644
--- a/sal/osl/w32/procimpl.cxx
+++ b/sal/osl/w32/procimpl.cxx
@@ -46,7 +46,7 @@
#include <string.h>
const sal_Unicode NAME_VALUE_SEPARATOR = TEXT('=');
-const sal_Char* SPACE = " ";
+const sal_Char SPACE[] = " ";
const rtl::OUString ENV_COMSPEC ("COMSPEC");
const rtl::OUString QUOTE("\"");
@@ -453,7 +453,7 @@ oslProcessError SAL_CALL osl_executeProcess_WithRedirectedIO(
start at 1 instead of 0 */
for (sal_uInt32 n = (nullptr != ustrImageName) ? 0 : 1; n < nArguments; n++)
{
- command_line.appendAscii(SPACE);
+ command_line.append(SPACE);
/* Quote arguments containing blanks */
if (rtl::OUString(ustrArguments[n]).indexOf(' ') != -1)
diff --git a/sal/osl/w32/socket.cxx b/sal/osl/w32/socket.cxx
index 4468521a8894..4e1249cf002b 100644
--- a/sal/osl/w32/socket.cxx
+++ b/sal/osl/w32/socket.cxx
@@ -273,7 +273,7 @@ struct LeakWarning
SAL_WARN_IF( g_nSocketAddr, "sal.osl", "sal_socket: " << g_nSocketAddr << " socket address instances leak" );
}
};
-LeakWarning socketWarning;
+static LeakWarning socketWarning;
#endif
oslSocket osl_createSocketImpl_(SOCKET Socket)
diff --git a/sal/osl/w32/thread.h b/sal/osl/w32/thread.h
index 5761b5a7fe0a..fb896f531cc5 100644
--- a/sal/osl/w32/thread.h
+++ b/sal/osl/w32/thread.h
@@ -20,6 +20,8 @@ extern "C" {
void SAL_CALL osl_callThreadKeyCallbackOnThreadDetach(void);
+extern DWORD g_dwTLSTextEncodingIndex;
+
#if defined __cplusplus
}
#endif