Disable -Wunused-(parameter|variable) on generated files

This commit is contained in:
Johannes Schmidt 2025-09-10 12:30:38 +02:00
parent 6fc966c502
commit 0b57e9a30c

View File

@ -1482,6 +1482,10 @@ void ClassCompiler::CompileStream(const std::string& path, std::istream& input,
<< "#pragma warning( push )" << std::endl
<< "#pragma warning( disable : 4244 )" << std::endl
<< "#pragma warning( disable : 4800 )" << std::endl
<< "#else /* _MSC_VER */" << std::endl
<< "#pragma GCC diagnostic push" << std::endl
<< "#pragma GCC diagnostic ignored \"-Wunused-parameter\"" << std::endl
<< "#pragma GCC diagnostic ignored \"-Wunused-variable\"" << std::endl
<< "#endif /* _MSC_VER */" << std::endl << std::endl;
@ -1492,5 +1496,7 @@ void ClassCompiler::CompileStream(const std::string& path, std::istream& input,
oimpl << "#ifdef _MSC_VER" << std::endl
<< "#pragma warning ( pop )" << std::endl
<< "#else /* _MSC_VER */" << std::endl
<< "#pragma GCC diagnostic pop" << std::endl
<< "#endif /* _MSC_VER */" << std::endl;
}