summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-02-03 16:21:55 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-02-03 20:27:29 +0100
commitb66c5f77d150056b2de262dae66301fcd7dc38c1 (patch)
treebe6cb75524abff6f1fbfda2c62fd2ce5cb132e2f /extensions
parent86af52b119eaf57b7c1f8943cc1c6631f2044482 (diff)
loplugin:unsignedcompare (clang-cl)
Change-Id: I69cc1b352221ca053ccd0c5b78e926480a8c9ccd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87884 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/ole/unoobjw.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx
index 5a10e03dcbea..b09f0cb19ce6 100644
--- a/extensions/source/ole/unoobjw.cxx
+++ b/extensions/source/ole/unoobjw.cxx
@@ -92,6 +92,7 @@
#include <comphelper/windowsdebugoutput.hxx>
#include <comphelper/windowserrorstring.hxx>
#include <o3tl/char16_t2wchar_t.hxx>
+#include <o3tl/safeint.hxx>
#include "comifaces.hxx"
#include "jscriptclasses.hxx"
@@ -807,7 +808,7 @@ HRESULT STDMETHODCALLTYPE CXTypeInfo::GetFuncDesc(UINT index,
assert(xClass->getTypeClass() == TypeClass_INTERFACE &&
aMethods.getLength() > 0);
- if (index > static_cast<UINT>(aMethods.getLength() - 3 + 3 + 4))
+ if (index > o3tl::make_unsigned(aMethods.getLength() - 3 + 3 + 4))
return E_INVALIDARG;
*ppFuncDesc = new FUNCDESC;
@@ -1904,7 +1905,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP InterfaceOleWrapper::Invoke(DISPID dispidMembe
if( bHandled)
return ret;
- if ((dispidMember > 0) && (static_cast<size_t>(dispidMember) <= m_MemberInfos.size()) && m_xInvocation.is())
+ if ((dispidMember > 0) && (o3tl::make_unsigned(dispidMember) <= m_MemberInfos.size()) && m_xInvocation.is())
{
MemberInfo d = m_MemberInfos[dispidMember - 1];
DWORD flags = wFlags & d.flags;