From 5c07c70e938325f0d8ab5892cf3debd3063dcc17 Mon Sep 17 00:00:00 2001 From: Jocelyn Le Sage Date: Thu, 22 May 2014 06:00:06 -0400 Subject: [PATCH] Fixed another 'return from incompatible pointer type' compiler warning generated by ExpectAnyArgs plugin. --- lib/cmock_generator_plugin_expect_any_args.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cmock_generator_plugin_expect_any_args.rb b/lib/cmock_generator_plugin_expect_any_args.rb index 8faa89f..2a3b481 100644 --- a/lib/cmock_generator_plugin_expect_any_args.rb +++ b/lib/cmock_generator_plugin_expect_any_args.rb @@ -45,7 +45,8 @@ class CMockGeneratorPluginExpectAnyArgs else retval = function[:return].merge( { :name => "cmock_call_instance->ReturnVal"} ) lines << " " + @utils.code_assign_argument_quickly("Mock.#{function[:name]}_FinalReturn", retval) unless (retval[:void?]) - lines << " return cmock_call_instance->ReturnVal;\n }\n" + return_type_cast = function[:return][:const?] ? "(const #{function[:return][:type]})" : '' + lines << " return #{return_type_cast}cmock_call_instance->ReturnVal;\n }\n" end lines end