diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-09-24 15:41:53 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-09-24 17:22:05 +0200 |
commit | 928b1b04adc1cd49cc5d00069084e03675a320f3 (patch) | |
tree | 8710687a4a66a628bd12c5482d7d93cc27f8996a /sal | |
parent | ec709a8d5e808b970a8930a389c0a5a6f61fe8c7 (diff) |
loplugin:external (clang-cl)
Including:
* expanding STDAPI to its definition (as per
<https://msdn.microsoft.com/library/ms686631(vs.85).aspx> "STDAPI"), to add
__declspec(dllexport) into its middle, in
extensions/source/activex/so_activex.cxx; as discussed in the comments at
<https://gerrit.libreoffice.org/#/c/60691/> "Get rid of Windows .def files in
setup_native, use __declspec(dllexport)", having a function both listed in a
.def file EXPORTS and marking it dllexport is OK, and the latter helps the
heuristics of loplugin:external; however, the relevant functions in
extensions/source/activex/so_activex.cxx probably don't even need to be
exported in the first place?
* follow-up loplugin:salcall in sal/osl/w32/file-impl.hxx
Change-Id: Ida6e17eba19cfa3d7e5c72dda57409005c0a0191
Reviewed-on: https://gerrit.libreoffice.org/60938
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/w32/file-impl.hxx | 2 | ||||
-rw-r--r-- | sal/osl/w32/file.cxx | 1 | ||||
-rw-r--r-- | sal/osl/w32/file_dirvol.cxx | 4 | ||||
-rw-r--r-- | sal/osl/w32/nlsupport.cxx | 4 | ||||
-rw-r--r-- | sal/osl/w32/pipe.cxx | 4 | ||||
-rw-r--r-- | sal/osl/w32/socket.cxx | 4 | ||||
-rw-r--r-- | sal/qa/osl/process/osl_process_child.cxx | 4 |
7 files changed, 12 insertions, 11 deletions
diff --git a/sal/osl/w32/file-impl.hxx b/sal/osl/w32/file-impl.hxx index 4db7b3eb257b..550a22dbf6f9 100644 --- a/sal/osl/w32/file-impl.hxx +++ b/sal/osl/w32/file-impl.hxx @@ -18,7 +18,7 @@ #define WIN32_LEAN_AND_MEAN #include <windows.h> -extern "C" oslFileHandle SAL_CALL osl_createFileHandleFromOSHandle( +extern "C" oslFileHandle osl_createFileHandleFromOSHandle( HANDLE hFile, sal_uInt32 uFlags); #endif diff --git a/sal/osl/w32/file.cxx b/sal/osl/w32/file.cxx index 78dfaa046939..c8b001e9847d 100644 --- a/sal/osl/w32/file.cxx +++ b/sal/osl/w32/file.cxx @@ -25,6 +25,7 @@ #include <sal/log.hxx> #include <o3tl/char16_t2wchar_t.hxx> +#include "file-impl.hxx" #include "file_url.hxx" #include "file_error.hxx" diff --git a/sal/osl/w32/file_dirvol.cxx b/sal/osl/w32/file_dirvol.cxx index 268c32a75dda..5e630c95a5ee 100644 --- a/sal/osl/w32/file_dirvol.cxx +++ b/sal/osl/w32/file_dirvol.cxx @@ -367,7 +367,7 @@ static HANDLE WINAPI OpenDirectory( rtl_uString* pPath) return static_cast<HANDLE>(pDirectory); } -BOOL WINAPI EnumDirectory(HANDLE hDirectory, LPWIN32_FIND_DATAW pFindData) +static BOOL WINAPI EnumDirectory(HANDLE hDirectory, LPWIN32_FIND_DATAW pFindData) { BOOL fSuccess = FALSE; LPDIRECTORY pDirectory = static_cast<LPDIRECTORY>(hDirectory); @@ -1149,7 +1149,7 @@ static inline bool is_floppy_A_present() static inline bool is_floppy_B_present() { return (GetLogicalDrives() & 2); } -bool is_floppy_volume_mount_point(const rtl::OUString& path) +static bool is_floppy_volume_mount_point(const rtl::OUString& path) { // determines if a volume mount point shows to a floppy // disk by comparing the unique volume names diff --git a/sal/osl/w32/nlsupport.cxx b/sal/osl/w32/nlsupport.cxx index d79d49bdd2f5..10888b9d6915 100644 --- a/sal/osl/w32/nlsupport.cxx +++ b/sal/osl/w32/nlsupport.cxx @@ -57,7 +57,7 @@ static DWORD g_dwTLSLocaleEncId = DWORD(-1); * callback function test *****************************************************************************/ -BOOL CALLBACK EnumLocalesProcW( LPWSTR lpLocaleStringW ) +static BOOL CALLBACK EnumLocalesProcW( LPWSTR lpLocaleStringW ) { /* check params received via TLS */ EnumLocalesParams * params = static_cast<EnumLocalesParams *>(TlsGetValue( g_dwTLSLocaleEncId )); @@ -111,7 +111,7 @@ BOOL CALLBACK EnumLocalesProcW( LPWSTR lpLocaleStringW ) return TRUE; } -rtl_TextEncoding GetTextEncodingFromLCID( LCID localeId ) +static rtl_TextEncoding GetTextEncodingFromLCID( LCID localeId ) { rtl_TextEncoding Encoding = RTL_TEXTENCODING_DONTKNOW; WCHAR ansiCP[6]; diff --git a/sal/osl/w32/pipe.cxx b/sal/osl/w32/pipe.cxx index 92ec4f918354..2e469b93e8c5 100644 --- a/sal/osl/w32/pipe.cxx +++ b/sal/osl/w32/pipe.cxx @@ -59,7 +59,7 @@ struct oslPipeImpl bool m_bClosed; }; -oslPipe osl_createPipeImpl(void) +static oslPipe osl_createPipeImpl(void) { oslPipe pPipe; @@ -78,7 +78,7 @@ oslPipe osl_createPipeImpl(void) return pPipe; } -void osl_destroyPipeImpl(oslPipe pPipe) +static void osl_destroyPipeImpl(oslPipe pPipe) { if (pPipe) { diff --git a/sal/osl/w32/socket.cxx b/sal/osl/w32/socket.cxx index e25e35cbdc24..130bdcdb9f05 100644 --- a/sal/osl/w32/socket.cxx +++ b/sal/osl/w32/socket.cxx @@ -224,7 +224,7 @@ struct LeakWarning static LeakWarning socketWarning; #endif -oslSocket createSocketImpl(SOCKET Socket) +static oslSocket createSocketImpl(SOCKET Socket) { oslSocket pSockImpl = static_cast<oslSocket>(rtl_allocateZeroMemory( sizeof(struct oslSocketImpl))); pSockImpl->m_Socket = Socket; @@ -232,7 +232,7 @@ oslSocket createSocketImpl(SOCKET Socket) return pSockImpl; } -void destroySocketImpl(oslSocketImpl *pImpl) +static void destroySocketImpl(oslSocketImpl *pImpl) { if (pImpl) { diff --git a/sal/qa/osl/process/osl_process_child.cxx b/sal/qa/osl/process/osl_process_child.cxx index 22c5df241c21..17f749bc270c 100644 --- a/sal/qa/osl/process/osl_process_child.cxx +++ b/sal/qa/osl/process/osl_process_child.cxx @@ -52,12 +52,12 @@ static void wait_for_seconds(char* time) #ifdef _WIN32 -void w_to_a(LPCWSTR strW, LPSTR strA, DWORD size) +static void w_to_a(LPCWSTR strW, LPSTR strA, DWORD size) { WideCharToMultiByte(CP_ACP, 0, strW, -1, strA, size, nullptr, nullptr); } - void dump_env(char* file_path) + static void dump_env(char* file_path) { LPWSTR env = GetEnvironmentStringsW(); LPWSTR p = env; |