From 900f718074043062617782cf6cab2cf861d696b1 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Wed, 21 Apr 2021 03:51:46 -0700 Subject: [PATCH] fix small clang warnings --- src/common/autoconfig-mac.h | 4 ++-- src/index/fsindexer.cpp | 2 +- src/query/recollq.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/autoconfig-mac.h b/src/common/autoconfig-mac.h index 2bc2d0ef..f0f1721f 100644 --- a/src/common/autoconfig-mac.h +++ b/src/common/autoconfig-mac.h @@ -128,7 +128,7 @@ #define PACKAGE_NAME "Recoll" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "Recoll 1.28.6pre4" +#define PACKAGE_STRING "Recoll 1.30.2" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "recoll" @@ -137,7 +137,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.28.6pre4" +#define PACKAGE_VERSION "1.30.2" /* putenv parameter is const */ /* #undef PUTENV_ARG_CONST */ diff --git a/src/index/fsindexer.cpp b/src/index/fsindexer.cpp index 11eaa458..be4b1518 100644 --- a/src/index/fsindexer.cpp +++ b/src/index/fsindexer.cpp @@ -269,7 +269,7 @@ static bool matchesSkipped( string topdir; for (;;) { // Used to test not root here, but root may be in topdirs ! - for (const auto tdlent : tdl) { + for (const auto& tdlent : tdl) { // the topdirs members are already canonized. LOGDEB1("matchesSkipped: comparing ancestor [" << mpath << "] to topdir [" << tdlent << "]\n"); diff --git a/src/query/recollq.cpp b/src/query/recollq.cpp index 0e2b2ffc..163130a6 100644 --- a/src/query/recollq.cpp +++ b/src/query/recollq.cpp @@ -66,7 +66,7 @@ string make_abstract(Rcl::Doc& doc, Rcl::Query& query, bool asSnippets, std::vector snippets; std::ostringstream str; if (query.makeDocAbstract(doc, snippets, snipcount, -1, true)) { - for (const auto snippet : snippets) { + for (const auto& snippet : snippets) { str << snippet.page << " : " << snippet.snippet << endl; } } @@ -467,7 +467,7 @@ endopts: << doc.fbytes << "\tbytes" << "\t" << endl; if (op_flags & OPT_m) { - for (const auto ent : doc.meta) { + for (const auto& ent : doc.meta) { cout << ent.first << " = " << ent.second << endl; } }