Resolved minor warnings.

This commit is contained in:
Patrick Lühne 2016-11-29 02:15:28 +01:00
parent 5d67d74395
commit a653556d77
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF
4 changed files with 6 additions and 6 deletions

View File

@ -45,7 +45,7 @@ struct TermPrintVisitor
}
// TODO: check correctness
void visit(const Clingo::AST::Function &function, const Clingo::AST::Literal &literal, const Clingo::AST::Term &term, Context &context)
void visit(const Clingo::AST::Function &function, const Clingo::AST::Literal &literal, const Clingo::AST::Term &, Context &context)
{
if (literal.sign == Clingo::AST::Sign::DoubleNegation)
throwErrorAtLocation(literal.location, "double-negated literals currently unsupported", context);

View File

@ -18,7 +18,7 @@ namespace anthem
struct TermCollectFunctionTermsVisitor
{
void visit(const Clingo::Symbol &symbol, const Clingo::AST::Term &term, Context &context)
void visit(const Clingo::Symbol &, const Clingo::AST::Term &term, Context &context)
{
throwErrorAtLocation(term.location, "“symbol” terms not allowed, function expected", context);
}
@ -64,7 +64,7 @@ struct TermCollectFunctionTermsVisitor
struct LiteralCollectFunctionTermsVisitor
{
void visit(const Clingo::AST::Boolean &, const Clingo::AST::Literal &, Context &context)
void visit(const Clingo::AST::Boolean &, const Clingo::AST::Literal &, Context &)
{
}
@ -124,7 +124,7 @@ struct HeadLiteralCollectFunctionTermsVisitor
struct TermPrintSubstitutedVisitor
{
void visit(const Clingo::Symbol &symbol, const Clingo::AST::Term &term, Context &context)
void visit(const Clingo::Symbol &, const Clingo::AST::Term &term, Context &context)
{
throwErrorAtLocation(term.location, "“symbol” terms not allowed, function expected", context);
}

View File

@ -44,7 +44,7 @@ void translate(const char *fileName, std::istream &stream, Context &context)
};
const auto logger =
[&context](const Clingo::WarningCode warningCode, const char *text)
[&context](const Clingo::WarningCode, const char *text)
{
context.logger.log(output::Priority::Error, text);
};

View File

@ -14,7 +14,7 @@ TEST_CASE("[translation] Rules are translated correctly", "[translation]")
std::stringstream errors;
anthem::output::Logger logger(output, errors);
anthem::Context context = {logger};
anthem::Context context = {logger, {}, 1};
SECTION("simple example 1")
{