fix compilation error / clang warnings
This commit is contained in:
@ -25,7 +25,7 @@
|
||||
|
||||
namespace Mu {
|
||||
|
||||
struct Store;
|
||||
class Store;
|
||||
|
||||
/// An object abstracting the index process.
|
||||
class Indexer {
|
||||
|
||||
@ -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<MuProc>(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;
|
||||
}
|
||||
|
||||
|
||||
@ -79,7 +79,7 @@ xapian_query_value (const Mu::Tree& tree)
|
||||
return make_query(v, parts.front(), true/*maybe-wildcard*/);
|
||||
|
||||
std::vector<Xapian::Query> 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());
|
||||
|
||||
@ -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() ==
|
||||
|
||||
@ -32,7 +32,6 @@
|
||||
|
||||
using namespace Mu;
|
||||
|
||||
constexpr auto MuLogDomain = "mu";
|
||||
static bool MuLogInitialized = false;
|
||||
static Mu::LogOptions MuLogOptions;
|
||||
static std::ofstream MuStream;
|
||||
|
||||
@ -176,7 +176,7 @@ struct Sexp {
|
||||
size_t empty() const { return seq_.empty(); }
|
||||
|
||||
private:
|
||||
friend class Sexp;
|
||||
friend struct Sexp;
|
||||
Seq seq_;
|
||||
};
|
||||
|
||||
|
||||
@ -541,7 +541,7 @@ 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,
|
||||
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);
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user