mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-08-02 09:17:51 +00:00
Push and pop GCC diagnostics to maintain scope for changed warning flags
This commit is contained in:
committed by
Trond Einar Snekvik
parent
58971b15db
commit
08b255868a
@@ -102,6 +102,7 @@ class CMockGenerator
|
||||
file << "\n"
|
||||
file << "/* Ignore the following warnings, since we are copying code */\n"
|
||||
file << "#if defined(__GNUC__) && !defined(__ICC) && !defined(__TMS470__)\n"
|
||||
file << "#pragma GCC diagnostic push\n"
|
||||
file << "#if !defined(__clang__)\n"
|
||||
file << "#pragma GCC diagnostic ignored \"-Wpragmas\"\n"
|
||||
file << "#endif\n"
|
||||
@@ -124,7 +125,12 @@ class CMockGenerator
|
||||
end
|
||||
|
||||
def create_mock_header_footer(header)
|
||||
header << "\n#endif\n"
|
||||
header << "\n"
|
||||
header << "#if defined(__GNUC__) && !defined(__ICC) && !defined(__TMS470__)\n"
|
||||
header << "#pragma GCC diagnostic pop\n"
|
||||
header << "#endif\n"
|
||||
header << "\n"
|
||||
header << "#endif\n"
|
||||
end
|
||||
|
||||
def create_source_header_section(file, filename, functions)
|
||||
|
||||
Reference in New Issue
Block a user