diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-27 16:33:44 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-28 12:49:54 +0200 |
commit | d5129a9dd68978f9eccdd4597b5b6834557c422a (patch) | |
tree | df43250172f784f3048ce42ce1c3410d1d449c1e /unoidl | |
parent | f3331f7694e74f349375c223ce7ed84838e92d89 (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 'unoidl')
-rw-r--r-- | unoidl/source/legacyprovider.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unoidl/source/legacyprovider.cxx b/unoidl/source/legacyprovider.cxx index d3f34bb0918e..9c0b21d8ab2e 100644 --- a/unoidl/source/legacyprovider.cxx +++ b/unoidl/source/legacyprovider.cxx @@ -390,7 +390,7 @@ rtl::Reference< Entity > readEntity( } std::vector< PlainStructTypeEntity::Member > mems; n = reader.getFieldCount(); - for (sal_uInt16 j = 0; j != n; ++j) { + for (sal_uInt32 j = 0; j != n; ++j) { mems.push_back( PlainStructTypeEntity::Member( reader.getFieldName(j), @@ -411,13 +411,13 @@ rtl::Reference< Entity > readEntity( " with key " + sub.getName())); } std::vector< OUString > params; - for (sal_uInt16 j = 0; j != n; ++j) { + for (sal_uInt32 j = 0; j != n; ++j) { params.push_back( reader.getReferenceTypeName(j).replace('/', '.')); } std::vector< PolymorphicStructTypeTemplateEntity::Member > mems; n = reader.getFieldCount(); - for (sal_uInt16 j = 0; j != n; ++j) { + for (sal_uInt32 j = 0; j != n; ++j) { mems.push_back( PolymorphicStructTypeTemplateEntity::Member( reader.getFieldName(j), |