From: Kevin Ottens Date: Tue, 18 Aug 2020 19:54:20 +0000 (+0200) Subject: Enable bugprone-too-small-loop-variable clang-tidy check X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~22^2~195^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0909f00a8bd978c8308427418c2e949b8971507e;p=nextcloud-desktop.git Enable bugprone-too-small-loop-variable clang-tidy check Signed-off-by: Kevin Ottens --- diff --git a/.clang-tidy b/.clang-tidy index 9aa0cb88c..302f6a3ce 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -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, diff --git a/test/benchmarks/benchlargesync.cpp b/test/benchmarks/benchlargesync.cpp index 9e78b9d5c..184c0a77d 100644 --- a/test/benchmarks/benchlargesync.cpp +++ b/test/benchmarks/benchlargesync.cpp @@ -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);