summaryrefslogtreecommitdiff
path: root/registry/source/regimpl.cxx
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 /registry/source/regimpl.cxx
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 'registry/source/regimpl.cxx')
-rw-r--r--registry/source/regimpl.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx
index 6af272039128..e20b41d13794 100644
--- a/registry/source/regimpl.cxx
+++ b/registry/source/regimpl.cxx
@@ -1274,7 +1274,7 @@ RegError ORegistry::mergeModuleValue(OStoreStream& rTargetValue,
0,
0);
- for (sal_uInt16 i=0 ; i < reader.getFieldCount(); i++)
+ for (sal_uInt32 i=0 ; i < reader.getFieldCount(); i++)
{
writer.setFieldData(index,
reader.getFieldName(i),
@@ -1285,7 +1285,7 @@ RegError ORegistry::mergeModuleValue(OStoreStream& rTargetValue,
reader.getFieldConstValue(i));
index++;
}
- for (sal_uInt16 i=0 ; i < reader2.getFieldCount(); i++)
+ for (sal_uInt32 i=0 ; i < reader2.getFieldCount(); i++)
{
if (nameSet.find(reader2.getFieldName(i)) == nameSet.end())
{