From 0675ee723d45e8074d2e2188983a9c19866a9078 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 26 Nov 2019 14:40:27 +0100 Subject: [PATCH] loplugin:external (clang-cl) Change-Id: Iab2231e90e55c7e583a2fafd08469ee01b02ce82 Reviewed-on: https://gerrit.libreoffice.org/83767 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- sal/osl/w32/file_dirvol.cxx | 4 ++++ sal/osl/w32/profile.cxx | 4 ++++ svl/source/svdde/ddesvr.cxx | 4 ++++ vcl/win/window/salframe.cxx | 8 ++++++++ winaccessibility/source/UAccCOM/MAccessible.cxx | 4 ++++ 5 files changed, 24 insertions(+) diff --git a/sal/osl/w32/file_dirvol.cxx b/sal/osl/w32/file_dirvol.cxx index 2c6ecbd34a28..773b18679f01 100644 --- a/sal/osl/w32/file_dirvol.cxx +++ b/sal/osl/w32/file_dirvol.cxx @@ -959,6 +959,8 @@ oslFileError SAL_CALL osl_closeDirectory(oslDirectory Directory) return eError; } +namespace { + /* Different types of paths */ enum PATHTYPE { @@ -969,6 +971,8 @@ enum PATHTYPE PATHTYPE_FILE }; +} + oslFileError SAL_CALL osl_getDirectoryItem(rtl_uString *strFilePath, oslDirectoryItem *pItem) { oslFileError error = osl_File_E_None; diff --git a/sal/osl/w32/profile.cxx b/sal/osl/w32/profile.cxx index 0c1da6527fd2..e35f48c2dfee 100644 --- a/sal/osl/w32/profile.cxx +++ b/sal/osl/w32/profile.cxx @@ -74,11 +74,15 @@ static void copy_ustr_n( void *dest, const void *source, size_t length ) { memcp typedef FILETIME osl_TStamp; +namespace { + enum osl_TLockMode { un_lock, read_lock, write_lock }; +} + struct osl_TFile { HANDLE m_Handle; diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx index beb55c195fc2..b2162e3a4a26 100644 --- a/svl/source/svdde/ddesvr.cxx +++ b/svl/source/svdde/ddesvr.cxx @@ -27,12 +27,16 @@ #include #include +namespace { + enum DdeItemType { DDEITEM, DDEGETPUTITEM }; +} + struct DdeItemImpData { HCONV nHCnv; diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index 2669083506b1..944acf6cd52d 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -3658,12 +3658,16 @@ bool ImplHandleSalObjSysCharMsg( HWND hWnd, WPARAM wParam, LPARAM lParam ) return nRet; } +namespace { + enum class DeferPolicy { Blocked, Allowed }; +} + // Remember to release the solar mutex on success! static WinSalFrame* ProcessOrDeferMessage( HWND hWnd, INT nMsg, WPARAM pWParam = 0, DeferPolicy eCanDefer = DeferPolicy::Allowed ) @@ -3704,12 +3708,16 @@ static WinSalFrame* ProcessOrDeferMessage( HWND hWnd, INT nMsg, WPARAM pWParam = return pFrame; } +namespace { + enum class PostedState { IsPosted, IsInitial }; +} + static bool ImplHandlePostPaintMsg( HWND hWnd, RECT* pRect, PostedState eProcessed = PostedState::IsPosted ) { diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index 5ffc93106c79..6a3b32849f73 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -72,6 +72,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::accessibility; using namespace com::sun::star::accessibility::AccessibleStateType; +namespace { + enum XInterfaceIndex { XI_COMPONENT = 0x01, XI_TEXT = 0x02, @@ -89,6 +91,8 @@ enum XInterfaceIndex { XI_NULL = -1 }; +} + // IA2 states mapping, and name // maintenance the consistency, change one array, change the three all long const IA2_STATES[] =