Enable bugprone-too-small-loop-variable clang-tidy check
authorKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 18 Aug 2020 19:54:20 +0000 (21:54 +0200)
committerKevin Ottens (Rebase PR Action) <er-vin@users.noreply.github.com>
Tue, 1 Sep 2020 06:37:03 +0000 (06:37 +0000)
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
.clang-tidy
test/benchmarks/benchlargesync.cpp

index 9aa0cb88c2fa3daa58ea59e657ccbce2a0ea6281..302f6a3cebc0b9404ac19d25030476db66de4e71 100644 (file)
@@ -4,6 +4,7 @@ Checks: '-*,
     bugprone-forward-declaration-namespace,
     bugprone-macro-parentheses,
     bugprone-narrowing-conversions,
+    bugprone-too-small-loop-variable,
     cppcoreguidelines-init-variables,
     misc-*,
     -misc-non-private-member-variables-in-classes,
index 9e78b9d5c6a51634763e64265595a4787298f892..184c0a77dbd0f484749a62168132df8680432b6e 100644 (file)
@@ -22,7 +22,7 @@ void addBunchOfFiles(int depth, const QString &path, FileModifier &fi) {
     }
     if (depth >= maxDepth)
         return;
-    for (char dirNum = 1; dirNum <= dirPerDir; ++dirNum) {
+    for (int dirNum = 1; dirNum <= dirPerDir; ++dirNum) {
         QString name = QStringLiteral("dir") + QString::number(dirNum);
         QString subPath = path.isEmpty() ? name : path + "/" + name;
         fi.mkdir(subPath);