Permalink
Browse files

Disable -Wformat-security in parts of C4AulCompiler (#1992, GH-64)

  • Loading branch information...
lluchs committed Feb 17, 2018
1 parent 0c8371f commit 334c57f2968263276ae12d69c262111a6d53ade2
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/script/C4AulCompiler.cpp
@@ -59,6 +59,10 @@ static std::string FormatCodePosition(const C4ScriptHost *source_host, const cha
return s;
}

#pragma GCC diagnostic push
// GCC does not properly handle that warning for strprintf in templated code, see #1992.
#pragma GCC diagnostic ignored "-Wformat-security"

template<class... T>
static void Warn(const C4ScriptHost *target_host, const C4ScriptHost *host, const char *SPos, const C4AulScriptFunc *func, C4AulWarningId warning, T &&...args)
{
@@ -115,6 +119,8 @@ static C4AulParseError Error(const C4ScriptHost *target_host, const C4ScriptHost
return Error(target_host, host, static_cast<const char*>(nullptr), func, msg, std::forward<T>(args)...);
}

#pragma GCC diagnostic pop

class C4AulCompiler::PreparseAstVisitor : public ::aul::DefaultRecursiveVisitor
{
// target_host: The C4ScriptHost on which compilation is done

0 comments on commit 334c57f

Please sign in to comment.