From 9af8f190ed1bf3f76897ad0c078db16451d6fb69 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 22 Jan 2018 13:11:34 +0100 Subject: More loplugin:cstylecast on Windows Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More loplugin:cstylecast" Change-Id: Ib3355159dd08333e1b7a8d091caf2069cdcc7862 Reviewed-on: https://gerrit.libreoffice.org/48317 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- sal/qa/osl/security/osl_Security.cxx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'sal/qa') diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx index 7a1d60b5c780..5d7ebe2905dc 100644 --- a/sal/qa/osl/security/osl_Security.cxx +++ b/sal/qa/osl/security/osl_Security.cxx @@ -488,7 +488,7 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *, psia=GetSidIdentifierAuthority(pSid); /* obtain sidsubauthority count */ - dwSubAuthorities=std::min((int) *GetSidSubAuthorityCount(pSid), 5); + dwSubAuthorities=std::min(static_cast(*GetSidSubAuthorityCount(pSid)), 5); /* buffer length: S-SID_REVISION- + identifierauthority- + subauthorities- + NULL */ Ident=static_cast(malloc(88*sizeof(wchar_t))); @@ -501,21 +501,21 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *, { dwSidSize+=wsprintfW(Ident + wcslen(Ident), L"0x%02hx%02hx%02hx%02hx%02hx%02hx", - (sal_uInt16)psia->Value[0], - (sal_uInt16)psia->Value[1], - (sal_uInt16)psia->Value[2], - (sal_uInt16)psia->Value[3], - (sal_uInt16)psia->Value[4], - (sal_uInt16)psia->Value[5]); + static_cast(psia->Value[0]), + static_cast(psia->Value[1]), + static_cast(psia->Value[2]), + static_cast(psia->Value[3]), + static_cast(psia->Value[4]), + static_cast(psia->Value[5])); } else { dwSidSize+=wsprintfW(Ident + wcslen(Ident), L"%lu", - (sal_uInt32)(psia->Value[5] ) + - (sal_uInt32)(psia->Value[4] << 8) + - (sal_uInt32)(psia->Value[3] << 16) + - (sal_uInt32)(psia->Value[2] << 24) ); + static_cast(psia->Value[5] ) + + static_cast(psia->Value[4] << 8) + + static_cast(psia->Value[3] << 16) + + static_cast(psia->Value[2] << 24) ); } /* loop through SidSubAuthorities */ -- cgit