Kaydet (Commit) a9d06182 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:externvar (clang-cl)

Change-Id: I81877e46cf95dcc7de16b797fca33658036bf9e8
üst 698bdcdb
......@@ -73,6 +73,9 @@ public:
// not needed and will not be emitted"
return true;
}
if (loplugin::DeclCheck(def).Var("_pRawDllMain").GlobalNamespace()) {
return true;
}
SourceLocation argLoc;
if (compat::isMacroArgExpansion(compiler, def->getLocation(), &argLoc)
&& (Lexer::getImmediateMacroName(
......
......@@ -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__
......
......@@ -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)
......
......@@ -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
......
......@@ -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)
{
......
......@@ -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 );
......
......@@ -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)
......
......@@ -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)
......
......@@ -20,6 +20,8 @@ extern "C" {
void SAL_CALL osl_callThreadKeyCallbackOnThreadDetach(void);
extern DWORD g_dwTLSTextEncodingIndex;
#if defined __cplusplus
}
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment