diff --git a/lib/index/mu-indexer.hh b/lib/index/mu-indexer.hh index c39862b7..67341c25 100644 --- a/lib/index/mu-indexer.hh +++ b/lib/index/mu-indexer.hh @@ -25,7 +25,7 @@ namespace Mu { -struct Store; +class Store; /// An object abstracting the index process. class Indexer { diff --git a/lib/mu-query.cc b/lib/mu-query.cc index 86adc626..565d2d49 100644 --- a/lib/mu-query.cc +++ b/lib/mu-query.cc @@ -200,7 +200,7 @@ get_query (MuQuery *mqx, const char* searchexpr, bool raw, GError **err) try { Mu::WarningVec warns; const auto tree = Mu::parse (searchexpr, warns, std::make_unique(mqx->db())); - for (const auto w: warns) + for (auto&& w: warns) std::cerr << w << std::endl; return Mu::xapian_query (tree); @@ -514,7 +514,7 @@ mu_query_internal (MuQuery *self, const char *searchexpr, ss << tree; if (warn) { - for (const auto w: warns) + for (auto&& w: warns) std::cerr << w << std::endl; } diff --git a/lib/query/mu-xapian.cc b/lib/query/mu-xapian.cc index 51125946..f058b66a 100644 --- a/lib/query/mu-xapian.cc +++ b/lib/query/mu-xapian.cc @@ -79,7 +79,7 @@ xapian_query_value (const Mu::Tree& tree) return make_query(v, parts.front(), true/*maybe-wildcard*/); std::vector phvec; - for (const auto p: parts) + for (const auto& p: parts) phvec.emplace_back(make_query(v, p, false/*no wildcards*/)); return Xapian::Query (Xapian::Query::OP_PHRASE, phvec.begin(), phvec.end()); diff --git a/lib/query/test-tokenizer.cc b/lib/query/test-tokenizer.cc index 62fa7ef4..5bfaf842 100644 --- a/lib/query/test-tokenizer.cc +++ b/lib/query/test-tokenizer.cc @@ -133,7 +133,7 @@ static void test_to_string () { std::stringstream ss; - for (const auto t: tokenize ("foo and bar xor not cuux or fnorb")) + for (auto&& t: tokenize ("foo and bar xor not cuux or fnorb")) ss << t << ' '; g_assert_true (ss.str() == diff --git a/lib/utils/mu-logger.cc b/lib/utils/mu-logger.cc index eaeb640f..d9b6decc 100644 --- a/lib/utils/mu-logger.cc +++ b/lib/utils/mu-logger.cc @@ -32,7 +32,6 @@ using namespace Mu; -constexpr auto MuLogDomain = "mu"; static bool MuLogInitialized = false; static Mu::LogOptions MuLogOptions; static std::ofstream MuStream; diff --git a/lib/utils/mu-sexp.hh b/lib/utils/mu-sexp.hh index 24490096..c90ee6f6 100644 --- a/lib/utils/mu-sexp.hh +++ b/lib/utils/mu-sexp.hh @@ -176,8 +176,8 @@ struct Sexp { size_t empty() const { return seq_.empty(); } private: - friend class Sexp; - Seq seq_; + friend struct Sexp; + Seq seq_; }; /** diff --git a/mu/mu-cmd-find.cc b/mu/mu-cmd-find.cc index f6a1e156..7e84a6b8 100644 --- a/mu/mu-cmd-find.cc +++ b/mu/mu-cmd-find.cc @@ -541,8 +541,8 @@ static gboolean output_sexp (MuMsg *msg, MuMsgIter *iter, const MuConfig *opts, GError **err) { const auto *ti{opts->threads ? mu_msg_iter_get_thread_info (iter) : NULL}; - const auto sexp{Mu:Mu::msg_to_sexp(msg , mu_msg_iter_get_docid (iter), ti, - MU_MSG_OPTION_HEADERS_ONLY)}; + const auto sexp{Mu::msg_to_sexp(msg , mu_msg_iter_get_docid (iter), ti, + MU_MSG_OPTION_HEADERS_ONLY)}; fputs (to_string(sexp, !opts->nocolor).c_str(), stdout); fputs ("\n", stdout); diff --git a/mu/mu-cmd.cc b/mu/mu-cmd.cc index 983ea3bf..dede3aba 100644 --- a/mu/mu-cmd.cc +++ b/mu/mu-cmd.cc @@ -372,7 +372,7 @@ static bool add_path_func (Mu::Store& store, const char *path, GError **err) { const auto docid = store.add_message (path); - g_debug ("added message @ %s, docid=%u", docid); + g_debug ("added message @ %s, docid=%u", path, docid); return true; } @@ -415,7 +415,7 @@ tickle_func (Mu::Store& store, const char *path, GError **err) return false; const auto res = mu_msg_tickle (msg, err); - g_debug ("tickled %s (%s)", res ? "ok" : "failed"); + g_debug ("tickled %s (%s)", path, res ? "ok" : "failed"); mu_msg_unref (msg); return res == TRUE;