From a8b2497fe6d50369d1461dcb5e264a36d5f8f72e Mon Sep 17 00:00:00 2001 From: Daniel Murdin Date: Wed, 13 Jul 2016 12:31:22 +0200 Subject: [PATCH 1/2] Pragma fix for TMS470 compilers. --- lib/cmock_generator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cmock_generator.rb b/lib/cmock_generator.rb index e7c2179..a1fb00a 100644 --- a/lib/cmock_generator.rb +++ b/lib/cmock_generator.rb @@ -100,7 +100,7 @@ class CMockGenerator file << plugin_includes if (!plugin_includes.empty?) file << "\n" file << "/* Ignore the following warnings, since we are copying code */\n" - file << "#if defined(__GNUC__) && !defined(__ICC)\n" + file << "#if defined(__GNUC__) && !defined(__ICC) && !defined(__TMS470__)\n" file << "#if !defined(__clang__)\n" file << "#pragma GCC diagnostic ignored \"-Wpragmas\"\n" file << "#endif\n" From af2226b15f5f89c43f36f2e14a76db1961e19ab1 Mon Sep 17 00:00:00 2001 From: Daniel Murdin Date: Wed, 13 Jul 2016 13:36:31 +0200 Subject: [PATCH 2/2] Fixed unit tests for TMS470 pragma fix. --- test/unit/cmock_generator_main_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit/cmock_generator_main_test.rb b/test/unit/cmock_generator_main_test.rb index 6bc0498..038fcfd 100644 --- a/test/unit/cmock_generator_main_test.rb +++ b/test/unit/cmock_generator_main_test.rb @@ -94,7 +94,7 @@ describe CMockGenerator, "Verify CMockGenerator Module" do "#include \"PluginRequiredHeader.h\"\n", "\n", "/* Ignore the following warnings, since we are copying code */\n", - "#if defined(__GNUC__) && !defined(__ICC)\n", + "#if defined(__GNUC__) && !defined(__ICC) && !defined(__TMS470__)\n", "#if !defined(__clang__)\n", "#pragma GCC diagnostic ignored \"-Wpragmas\"\n", "#endif\n", @@ -144,7 +144,7 @@ describe CMockGenerator, "Verify CMockGenerator Module" do "#include \"PluginRequiredHeader.h\"\n", "\n", "/* Ignore the following warnings, since we are copying code */\n", - "#if defined(__GNUC__) && !defined(__ICC)\n", + "#if defined(__GNUC__) && !defined(__ICC) && !defined(__TMS470__)\n", "#if !defined(__clang__)\n", "#pragma GCC diagnostic ignored \"-Wpragmas\"\n", "#endif\n", @@ -178,7 +178,7 @@ describe CMockGenerator, "Verify CMockGenerator Module" do "#include \"#{orig_filename}\"\n", "\n", "/* Ignore the following warnings, since we are copying code */\n", - "#if defined(__GNUC__) && !defined(__ICC)\n", + "#if defined(__GNUC__) && !defined(__ICC) && !defined(__TMS470__)\n", "#if !defined(__clang__)\n", "#pragma GCC diagnostic ignored \"-Wpragmas\"\n", "#endif\n", @@ -213,7 +213,7 @@ describe CMockGenerator, "Verify CMockGenerator Module" do "#include \"PluginRequiredHeader.h\"\n", "\n", "/* Ignore the following warnings, since we are copying code */\n", - "#if defined(__GNUC__) && !defined(__ICC)\n", + "#if defined(__GNUC__) && !defined(__ICC) && !defined(__TMS470__)\n", "#if !defined(__clang__)\n", "#pragma GCC diagnostic ignored \"-Wpragmas\"\n", "#endif\n",