Only use -Wv:18 in Visual Studio 2019
And fix the warnings discovered in Visual Studio 2022: C:/lo/core/cli_ure/source/uno_bridge/cli_proxy.cxx(714): warning C4456: declaration of 'numMethods' hides previous local declaration C:/lo/core/cli_ure/source/uno_bridge/cli_proxy.cxx(681): note: see declaration of 'numMethods' C:/lo/core/cli_ure/source/uno_bridge/cli_proxy.cxx(1032): warning C4457: declaration of 'pUnoI' hides function parameter C:/lo/core/cli_ure/source/uno_bridge/cli_proxy.cxx(918): note: see declaration of 'pUnoI' C:/lo/core/cli_ure/source/uno_bridge/cli_uno.cxx(109): warning C4456: declaration of 'param' hides previous local declaration C:/lo/core/cli_ure/source/uno_bridge/cli_uno.cxx(84): note: see declaration of 'param' C:/lo/core/cli_ure/source/uno_bridge/cli_uno.cxx(256): warning C4456: declaration of 'param' hides previous local declaration C:/lo/core/cli_ure/source/uno_bridge/cli_uno.cxx(240): note: see declaration of 'param' Change-Id: I99abcf17c7c431a403a488c53b65ef34d66d0940 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169782 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
This commit is contained in:
parent
263dc5c171
commit
7b428b1607
3 changed files with 11 additions and 11 deletions
|
@ -711,7 +711,7 @@ void CliProxy::makeMethodInfos()
|
||||||
{
|
{
|
||||||
sr::InterfaceMapping mapInherited = objType->GetInterfaceMap(
|
sr::InterfaceMapping mapInherited = objType->GetInterfaceMap(
|
||||||
arInheritedIfaces[nArLength - 1]);
|
arInheritedIfaces[nArLength - 1]);
|
||||||
int numMethods = mapInherited.TargetMethods->Length;
|
numMethods = mapInherited.TargetMethods->Length;
|
||||||
m_arInterfaceMethodCount[nArLength - 1] = numMethods;
|
m_arInterfaceMethodCount[nArLength - 1] = numMethods;
|
||||||
for (int i = 0; i < numMethods; i++, index++)
|
for (int i = 0; i < numMethods; i++, index++)
|
||||||
{
|
{
|
||||||
|
@ -1029,11 +1029,11 @@ void SAL_CALL cli_proxy_dispatch(
|
||||||
OSL_ENSURE(usOid.equals( proxy->m_usOid ),
|
OSL_ENSURE(usOid.equals( proxy->m_usOid ),
|
||||||
"### different oids!");
|
"### different oids!");
|
||||||
#endif
|
#endif
|
||||||
uno_Interface* pUnoI = bridge->map_cli2uno(
|
uno_Interface* pUnoI2 = bridge->map_cli2uno(
|
||||||
proxy->m_cliI, demanded_td.get() );
|
proxy->m_cliI, demanded_td.get() );
|
||||||
uno_any_construct(
|
uno_any_construct(
|
||||||
(uno_Any *)uno_ret, &pUnoI, demanded_td.get(), 0 );
|
(uno_Any *)uno_ret, &pUnoI2, demanded_td.get(), 0 );
|
||||||
(*pUnoI->release)( pUnoI );
|
(*pUnoI2->release)( pUnoI2 );
|
||||||
}
|
}
|
||||||
else // object does not support demanded interface
|
else // object does not support demanded interface
|
||||||
{
|
{
|
||||||
|
|
|
@ -106,10 +106,10 @@ System::Object^ Bridge::call_uno(uno_Interface * pUnoI,
|
||||||
// cleanup uno in args
|
// cleanup uno in args
|
||||||
for (sal_Int32 n = 0; n < nPos; ++n)
|
for (sal_Int32 n = 0; n < nPos; ++n)
|
||||||
{
|
{
|
||||||
typelib_MethodParameter const & param = pParams[n];
|
typelib_MethodParameter const & param2 = pParams[n];
|
||||||
if (param.bIn)
|
if (param2.bIn)
|
||||||
{
|
{
|
||||||
uno_type_destructData(uno_args[n], param.pTypeRef, 0);
|
uno_type_destructData(uno_args[n], param2.pTypeRef, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw;
|
throw;
|
||||||
|
@ -253,9 +253,9 @@ void Bridge::call_cli(
|
||||||
// cleanup uno pure out
|
// cleanup uno pure out
|
||||||
for ( sal_Int32 n = 0; n < nPos; ++n )
|
for ( sal_Int32 n = 0; n < nPos; ++n )
|
||||||
{
|
{
|
||||||
typelib_MethodParameter const & param = params[ n ];
|
typelib_MethodParameter const & param2 = params[ n ];
|
||||||
if (! param.bIn)
|
if (! param2.bIn)
|
||||||
uno_type_destructData( uno_args[ n ], param.pTypeRef, 0 );
|
uno_type_destructData( uno_args[ n ], param2.pTypeRef, 0 );
|
||||||
}
|
}
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|
|
@ -271,7 +271,7 @@ gb_CXXCLRFLAGS := \
|
||||||
-AI $(INSTDIR)/$(LIBO_URE_LIB_FOLDER) \
|
-AI $(INSTDIR)/$(LIBO_URE_LIB_FOLDER) \
|
||||||
-EHa \
|
-EHa \
|
||||||
-clr \
|
-clr \
|
||||||
-Wv:18 \
|
$(if $(filter 16.0,$(VCVER)),-Wv:18) \
|
||||||
-Zc:twoPhase- \
|
-Zc:twoPhase- \
|
||||||
|
|
||||||
ifeq ($(COM_IS_CLANG),TRUE)
|
ifeq ($(COM_IS_CLANG),TRUE)
|
||||||
|
|
Loading…
Reference in a new issue