From afbfe42e63cdba1a18c292d7eb4875009b0f19c0 Mon Sep 17 00:00:00 2001 From: Tamás Zolnai Date: Sat, 10 Nov 2018 17:34:31 +0100 Subject: clang-tidy: (WIP) bugprone-too-small-loop-variable findings 2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I1ddf3fe0e5fad265ae14712a23469b684253079d Reviewed-on: https://gerrit.libreoffice.org/63241 Tested-by: Jenkins Reviewed-by: Tamás Zolnai --- sax/qa/cppunit/xmlimport.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sax') diff --git a/sax/qa/cppunit/xmlimport.cxx b/sax/qa/cppunit/xmlimport.cxx index 38944154deba..dfcd778b6924 100644 --- a/sax/qa/cppunit/xmlimport.cxx +++ b/sax/qa/cppunit/xmlimport.cxx @@ -295,7 +295,7 @@ Sequence< sal_Int8 > DummyTokenHandler::getUTF8Identifier( sal_Int32 nToken ) } else //element or attribute { - sal_uInt32 nElementToken = nToken & 0xffff; + size_t nElementToken = nToken & 0xffff; if ( nElementToken < SAL_N_ELEMENTS(tokens) ) aUtf8Token = tokens[ nElementToken ]; } @@ -313,7 +313,7 @@ sal_Int32 DummyTokenHandler::getTokenFromUTF8( const uno::Sequence< sal_Int8 >& sal_Int32 DummyTokenHandler::getTokenDirect( const char* pToken, sal_Int32 nLength ) const { OString sToken( pToken, nLength ); - for( sal_uInt16 i = 0; i < SAL_N_ELEMENTS(tokens); i++ ) + for( size_t i = 0; i < SAL_N_ELEMENTS(tokens); i++ ) { if ( tokens[i] == sToken ) return static_cast(i); @@ -384,7 +384,7 @@ void XMLImportTest::parse() "multiplens.xml", "multiplepfx.xml", "nstoattributes.xml", "nestedns.xml", "testthreading.xml"}; - for (sal_uInt16 i = 0; i < SAL_N_ELEMENTS( fileNames ); i++) + for (size_t i = 0; i < SAL_N_ELEMENTS( fileNames ); i++) { InputSource source; source.sSystemId = "internal"; -- cgit