1
0
mirror of https://github.com/ThrowTheSwitch/CMock synced 2025-06-02 04:09:34 -04:00

Fixed another 'return from incompatible pointer type' compiler warning generated by ExpectAnyArgs plugin.

This commit is contained in:
Jocelyn Le Sage 2014-05-22 06:00:06 -04:00
parent f357e19765
commit 5c07c70e93

@ -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