summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-27 16:33:44 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-02-05 23:03:06 -0500
commitd36729353fcd91266a208ed12749512eabdd4339 (patch)
tree4c19d9a2cb8a84ec5f5329188e4de6742d6a5829 /tools
parentb43233d4a1fe38e1758a170460bb34526ec64df7 (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 (cherry picked from commit d5129a9dd68978f9eccdd4597b5b6834557c422a)
Diffstat (limited to 'tools')
-rw-r--r--tools/source/stream/stream.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index bb6d21e1a92a..d7847b4e9921 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -1589,7 +1589,7 @@ static unsigned char implGetCryptMask(const sal_Char* pStr, sal_Int32 nLen, long
}
else // BugFix #25888#
{
- for( sal_uInt16 i = 0; i < nLen; i++ ) {
+ for( sal_Int32 i = 0; i < nLen; i++ ) {
nCryptMask ^= pStr[i];
if( nCryptMask & 0x80 ) {
nCryptMask <<= 1;