summaryrefslogtreecommitdiff
path: root/UnoControls
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-27 16:33:44 +0200
committerNoel Grandin <noel@peralex.com>2015-05-28 12:49:54 +0200
commitd5129a9dd68978f9eccdd4597b5b6834557c422a (patch)
treedf43250172f784f3048ce42ce1c3410d1d449c1e /UnoControls
parentf3331f7694e74f349375c223ce7ed84838e92d89 (diff)
new clang plugin: loopvartoosmall
Idea from bubli - look for loops where the index variable is of such size that it cannot cover the range revealed by examining the length part of the condition. So far, I have only run the plugin up till the VCL module. Also the plugin deliberately excludes anything more complicated than a straightforward incrementing for loop. Change-Id: Ifced18b01c03ea537c64168465ce0b8287a42015
Diffstat (limited to 'UnoControls')
-rw-r--r--UnoControls/source/controls/progressbar.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/UnoControls/source/controls/progressbar.cxx b/UnoControls/source/controls/progressbar.cxx
index 6ff24bed4704..f5dd914ff2b7 100644
--- a/UnoControls/source/controls/progressbar.cxx
+++ b/UnoControls/source/controls/progressbar.cxx
@@ -352,7 +352,7 @@ void ProgressBar::impl_paint ( sal_Int32 nX, sal_Int32 nY, const Reference< XGra
// Step to left side of window
nBlockStart = nX;
- for ( sal_Int16 i=1; i<=nBlockCount; ++i )
+ for ( sal_Int32 i=1; i<=nBlockCount; ++i )
{
// step free field
nBlockStart += PROGRESSBAR_FREESPACE;
@@ -370,7 +370,7 @@ void ProgressBar::impl_paint ( sal_Int32 nX, sal_Int32 nY, const Reference< XGra
nBlockStart = nY+impl_getHeight();
nBlockStart -= m_aBlockSize.Height;
- for ( sal_Int16 i=1; i<=nBlockCount; ++i )
+ for ( sal_Int32 i=1; i<=nBlockCount; ++i )
{
// step free field
nBlockStart -= PROGRESSBAR_FREESPACE;