summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2018-10-31 17:20:46 +0100
committerTamás Zolnai <tamas.zolnai@collabora.com>2018-11-01 13:02:26 +0100
commit26ccd00bc96c585b7065af0dcce246b5bfaae5e1 (patch)
tree960e163c0041c813e10f567995d648dc9332449d /sdext
parent0610c4439edf95b4cc4e16ee625b60ba606f7528 (diff)
clang-tidy: (WIP) bugprone-too-small-loop-variable findings
Change-Id: Iaa255b39928ac45dec1ed37e368c149d6027f561 Reviewed-on: https://gerrit.libreoffice.org/62701 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/filterdet.cxx2
-rw-r--r--sdext/source/pdfimport/pdfparse/pdfentries.cxx4
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx2
3 files changed, 4 insertions, 4 deletions
diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx
index 43cfd1ff0120..b48fc648ea04 100644
--- a/sdext/source/pdfimport/filterdet.cxx
+++ b/sdext/source/pdfimport/filterdet.cxx
@@ -237,7 +237,7 @@ OUString SAL_CALL PDFDetector::detect( uno::Sequence< beans::PropertyValue >& rF
if( nBytes > 5 )
{
const sal_Int8* pBytes = aBuf.getConstArray();
- for( unsigned int i = 0; i < nBytes-5; i++ )
+ for( sal_uInt64 i = 0; i < nBytes-5; i++ )
{
if( pBytes[i] == '%' &&
pBytes[i+1] == 'P' &&
diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
index 7d176ebdfc16..7bc541c3b1bd 100644
--- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
@@ -1189,7 +1189,7 @@ static bool check_user_password( const OString& rPwd, PDFFileImplData* pData )
for( int i = 1; i <= 19; i++ ) // do it 19 times, start with 1
{
sal_uInt8 aTempKey[ENCRYPTION_KEY_LEN];
- for( sal_uInt32 j = 0; j < sizeof(aTempKey); j++ )
+ for( size_t j = 0; j < sizeof(aTempKey); j++ )
aTempKey[j] = static_cast<sal_uInt8>( aKey[j] ^ i );
if (rtl_cipher_initARCFOUR( pData->m_aCipher, rtl_Cipher_DirectionEncode,
@@ -1257,7 +1257,7 @@ bool PDFFile::setupDecryptionData( const OString& rPwd ) const
for( int i = 19; i >= 0; i-- )
{
sal_uInt8 nTempKey[ENCRYPTION_KEY_LEN];
- for( unsigned int j = 0; j < sizeof(nTempKey); j++ )
+ for( size_t j = 0; j < sizeof(nTempKey); j++ )
nTempKey[j] = sal_uInt8(aKey[j] ^ i);
if (rtl_cipher_initARCFOUR( m_pData->m_aCipher, rtl_Cipher_DirectionDecode,
nTempKey, nKeyLen, nullptr, 0 )
diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
index 16db05afe870..28334dac56d8 100644
--- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
@@ -81,7 +81,7 @@ int main(int argc, char **argv)
aPwBuf[0] = 0; // mark as empty
else
{
- for( unsigned int i = 0; i < sizeof(aPwBuf); i++ )
+ for( size_t i = 0; i < sizeof(aPwBuf); i++ )
{
if( aPwBuf[i] == '\n' )
{