From a006f60b6ae22db6acb57d06167a3c6fd8bc6f1b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 23 Jun 2017 16:04:59 +0200 Subject: loplugin:oncevar in helpcompiler..jvmfwk Change-Id: Ia9b20a8ca95684cbeb21e3425972c43ba50df3cd Reviewed-on: https://gerrit.libreoffice.org/39187 Tested-by: Jenkins Reviewed-by: Noel Grandin --- i18nutil/source/utility/paper.cxx | 2 +- i18nutil/source/utility/widthfolding.cxx | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'i18nutil') diff --git a/i18nutil/source/utility/paper.cxx b/i18nutil/source/utility/paper.cxx index 9d18618fd3a3..7ab91d089b3c 100644 --- a/i18nutil/source/utility/paper.cxx +++ b/i18nutil/source/utility/paper.cxx @@ -259,7 +259,7 @@ PaperInfo PaperInfo::getSystemDefaultPaper() bool bHalve = false; - size_t nExtraTabSize = SAL_N_ELEMENTS(aCustoms); + size_t const nExtraTabSize = SAL_N_ELEMENTS(aCustoms); for (size_t i = 0; i < nExtraTabSize; ++i) { if (rtl_str_compareIgnoreAsciiCase(aCustoms[i].pName, aPaper.getStr()) == 0) diff --git a/i18nutil/source/utility/widthfolding.cxx b/i18nutil/source/utility/widthfolding.cxx index 3b948025e318..84963f54c922 100644 --- a/i18nutil/source/utility/widthfolding.cxx +++ b/i18nutil/source/utility/widthfolding.cxx @@ -252,9 +252,7 @@ oneToOneMapping& widthfolding::gethalf2fullTableForJIS() // // See the following page for detail: // http://wiki.openoffice.org/wiki/Calc/Features/JIS_and_ASC_functions - int i, j; - int n = SAL_N_ELEMENTS(half2fullJISException); - for( i = 0; i < n; i++ ) + for( int i = 0; i < int(SAL_N_ELEMENTS(half2fullJISException)); i++ ) { const int high = (half2fullJISException[i].first >> 8) & 0xFF; const int low = (half2fullJISException[i].first) & 0xFF; @@ -263,7 +261,7 @@ oneToOneMapping& widthfolding::gethalf2fullTableForJIS() { table.mpIndex[high] = new UnicodePairWithFlag*[256]; - for( j = 0; j < 256; j++ ) + for( int j = 0; j < 256; j++ ) table.mpIndex[high][j] = nullptr; } table.mpIndex[high][low] = &half2fullJISException[i]; -- cgit