summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-10-01 16:19:32 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-10-02 08:18:57 +0200
commit38ee6b2ad540c0d5cc0182396787d4c7625ea064 (patch)
tree9980898ba49c225d0a851a60bf97d276e07f4220 /shell
parent4d45df2632dddde3d8e34315c8ee76575587a62a (diff)
-Werror,-Wmicrosoft-exception-spec (clang-cl)
No idea why that started to show up now, but C:/Program Files (x86)/Windows Kits/10/Include/10.0.17763.0/um/combaseapi.h contains > #define STDMETHOD(method) virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE method while C:/Program Files (x86)/Windows Kits/10/Include/10.0.17763.0/um/winnt.h contains > #define STDMETHODIMP HRESULT STDMETHODCALLTYPE which caused failures like > [build CXX] embedserv/source/inprocserv/dllentry.cxx > embedserv/source/inprocserv/dllentry.cxx(261,40): error: 'QueryInterface' is missing exception specification '__attribute__((nothrow))' [-Werror,-Wmicrosoft-exception-spec] > STDMETHODIMP InprocEmbedProvider_Impl::QueryInterface( REFIID riid, void ** ppv ) > ^ > embedserv/source/inprocserv/dllentry.cxx(143,15): note: previous declaration is here > STDMETHOD(QueryInterface)(REFIID riid, void ** ppvObj) override; > ^ Change-Id: I0fe3554c2da4089bf0f883e1132d6f2ee95ae2c3 Reviewed-on: https://gerrit.libreoffice.org/79970 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/inc/columninfo.hxx12
-rw-r--r--shell/inc/infotips.hxx4
-rw-r--r--shell/source/win32/shlxthandler/columninfo/columninfo.cxx12
-rw-r--r--shell/source/win32/shlxthandler/infotips/infotips.cxx4
4 files changed, 16 insertions, 16 deletions
diff --git a/shell/inc/columninfo.hxx b/shell/inc/columninfo.hxx
index 105ba7566de5..6a6710a65ac6 100644
--- a/shell/inc/columninfo.hxx
+++ b/shell/inc/columninfo.hxx
@@ -33,23 +33,23 @@ public:
// IUnknown methods
- virtual HRESULT STDMETHODCALLTYPE QueryInterface(
+ virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE QueryInterface(
REFIID riid,
void __RPC_FAR *__RPC_FAR *ppvObject) override;
- virtual ULONG STDMETHODCALLTYPE AddRef() override;
+ virtual COM_DECLSPEC_NOTHROW ULONG STDMETHODCALLTYPE AddRef() override;
- virtual ULONG STDMETHODCALLTYPE Release() override;
+ virtual COM_DECLSPEC_NOTHROW ULONG STDMETHODCALLTYPE Release() override;
// IColumnProvider
- virtual HRESULT STDMETHODCALLTYPE Initialize(LPCSHCOLUMNINIT psci) override;
+ virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE Initialize(LPCSHCOLUMNINIT psci) override;
- virtual HRESULT STDMETHODCALLTYPE GetColumnInfo(DWORD dwIndex, SHCOLUMNINFO *psci) override;
+ virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE GetColumnInfo(DWORD dwIndex, SHCOLUMNINFO *psci) override;
- virtual HRESULT STDMETHODCALLTYPE GetItemData(
+ virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE GetItemData(
LPCSHCOLUMNID pscid, LPCSHCOLUMNDATA pscd, VARIANT *pvarData) override;
private:
diff --git a/shell/inc/infotips.hxx b/shell/inc/infotips.hxx
index 0155559752ce..ac9218a71762 100644
--- a/shell/inc/infotips.hxx
+++ b/shell/inc/infotips.hxx
@@ -47,9 +47,9 @@ public:
// IQueryInfo methods
- virtual HRESULT STDMETHODCALLTYPE GetInfoTip(DWORD dwFlags, PWSTR* ppwszTip) override;
+ virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE GetInfoTip(DWORD dwFlags, PWSTR* ppwszTip) override;
- virtual HRESULT STDMETHODCALLTYPE GetInfoFlags(DWORD *pdwFlags) override;
+ virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE GetInfoFlags(DWORD *pdwFlags) override;
// IPersist methods
diff --git a/shell/source/win32/shlxthandler/columninfo/columninfo.cxx b/shell/source/win32/shlxthandler/columninfo/columninfo.cxx
index 8d8ffbed4483..d1329e0fee0b 100644
--- a/shell/source/win32/shlxthandler/columninfo/columninfo.cxx
+++ b/shell/source/win32/shlxthandler/columninfo/columninfo.cxx
@@ -71,7 +71,7 @@ CColumnInfo::~CColumnInfo()
// IUnknown methods
-HRESULT STDMETHODCALLTYPE CColumnInfo::QueryInterface(REFIID riid, void __RPC_FAR *__RPC_FAR *ppvObject)
+COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE CColumnInfo::QueryInterface(REFIID riid, void __RPC_FAR *__RPC_FAR *ppvObject)
{
*ppvObject = nullptr;
@@ -87,13 +87,13 @@ HRESULT STDMETHODCALLTYPE CColumnInfo::QueryInterface(REFIID riid, void __RPC_FA
}
-ULONG STDMETHODCALLTYPE CColumnInfo::AddRef()
+COM_DECLSPEC_NOTHROW ULONG STDMETHODCALLTYPE CColumnInfo::AddRef()
{
return InterlockedIncrement(&m_RefCnt);
}
-ULONG STDMETHODCALLTYPE CColumnInfo::Release()
+COM_DECLSPEC_NOTHROW ULONG STDMETHODCALLTYPE CColumnInfo::Release()
{
long refcnt = InterlockedDecrement(&m_RefCnt);
@@ -107,13 +107,13 @@ ULONG STDMETHODCALLTYPE CColumnInfo::Release()
// IColumnProvider
-HRESULT STDMETHODCALLTYPE CColumnInfo::Initialize(LPCSHCOLUMNINIT /*psci*/)
+COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE CColumnInfo::Initialize(LPCSHCOLUMNINIT /*psci*/)
{
return S_OK;
}
// Register all columns we support
-HRESULT STDMETHODCALLTYPE CColumnInfo::GetColumnInfo(DWORD dwIndex, SHCOLUMNINFO *psci)
+COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE CColumnInfo::GetColumnInfo(DWORD dwIndex, SHCOLUMNINFO *psci)
{
if (dwIndex >= ColumnInfoTableSize)
return S_FALSE;
@@ -131,7 +131,7 @@ HRESULT STDMETHODCALLTYPE CColumnInfo::GetColumnInfo(DWORD dwIndex, SHCOLUMNINFO
return S_OK;
}
-HRESULT STDMETHODCALLTYPE CColumnInfo::GetItemData(LPCSHCOLUMNID pscid, LPCSHCOLUMNDATA pscd, VARIANT *pvarData)
+COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE CColumnInfo::GetItemData(LPCSHCOLUMNID pscid, LPCSHCOLUMNDATA pscd, VARIANT *pvarData)
{
if (IsOOFileExtension(pscd->pwszExt))
{
diff --git a/shell/source/win32/shlxthandler/infotips/infotips.cxx b/shell/source/win32/shlxthandler/infotips/infotips.cxx
index aa061eb25490..3e3d0c3a1a88 100644
--- a/shell/source/win32/shlxthandler/infotips/infotips.cxx
+++ b/shell/source/win32/shlxthandler/infotips/infotips.cxx
@@ -191,7 +191,7 @@ static std::wstring getFileSizeInfo(wchar_t const * FileName)
// IQueryInfo methods
-HRESULT STDMETHODCALLTYPE CInfoTip::GetInfoTip(DWORD /*dwFlags*/, PWSTR* ppwszTip)
+COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE CInfoTip::GetInfoTip(DWORD /*dwFlags*/, PWSTR* ppwszTip)
{
std::wstring msg;
const std::wstring CONST_SPACE(SPACE);
@@ -297,7 +297,7 @@ HRESULT STDMETHODCALLTYPE CInfoTip::GetInfoTip(DWORD /*dwFlags*/, PWSTR* ppwszTi
}
-HRESULT STDMETHODCALLTYPE CInfoTip::GetInfoFlags(DWORD * /*pdwFlags*/ )
+COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE CInfoTip::GetInfoFlags(DWORD * /*pdwFlags*/ )
{
return E_NOTIMPL;
}