mu: fix clang compilation

This commit is contained in:
Dirk-Jan C. Binnema 2020-01-24 00:21:53 +02:00
parent 72e67ca389
commit e119ac919b
5 changed files with 11 additions and 12 deletions

View File

@ -98,9 +98,6 @@ using CommandMap = std::unordered_map<std::string, CommandInfo>;
void invoke(const Command::CommandMap& cmap, const Sexp::Node& call);
} // namespace Command
static inline std::ostream&
operator<<(std::ostream& os, const Command::ArgInfo& info)
{
@ -129,6 +126,8 @@ operator<<(std::ostream& os, const Command::CommandMap& map)
return os;
}
} // namespace Command
} // namespace Mu

View File

@ -33,7 +33,7 @@ parsing_error(size_t pos, const char* frm, ...)
va_end(args);
if (pos == 0)
return Mu::Error(Error::Code::Parsing, "%s", msg);
return Mu::Error(Error::Code::Parsing, "%s", msg.c_str());
else
return Mu::Error(Error::Code::Parsing, "%zu: %s", msg.c_str());
}
@ -149,7 +149,7 @@ parse (const std::string& expr, size_t& pos)
else if (isalpha(kar) || kar == ':')
return parse_symbol(expr, pos);
else
throw parsing_error(pos, "unexpected character '%c" + kar);
throw parsing_error(pos, "unexpected character '%c", kar);
}();
pos = skip_whitespace(expr, pos);

View File

@ -22,8 +22,6 @@
#include <string>
#include <vector>
#include <ostream>
#include "utils/mu-error.hh"
@ -79,8 +77,6 @@ struct Node {
*/
Node parse(const std::string& expr);
} // Sexp
static inline std::ostream&
operator<<(std::ostream& os, Sexp::Type id)
{
@ -110,6 +106,10 @@ operator<<(std::ostream& os, const Sexp::Node& node)
return os;
}
} // Sexp
} // Mu
#endif /* MU_SEXP_PARSER_HH__ */

View File

@ -25,6 +25,7 @@
#include <vector>
#include <cstdarg>
#include <glib.h>
#include <ostream>
namespace Mu {
@ -165,7 +166,6 @@ static inline std::string to_string (const T& val)
}
/**
*
* don't repeat these catch blocks everywhere...

View File

@ -1030,8 +1030,8 @@ remove_handler (Context& context, const Parameters& params)
if (!mu_store_remove_path (context.store, path.c_str()))
throw Error(Error::Code::Store,
"failed to remove message @ %s (%d) from store",
path, docid);
"failed to remove message @ %s (%d) from store",
path.c_str(), docid);
print_expr ("(:remove %u)", docid);
}