mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-08-27 05:19:59 +00:00
Merge pull request #33 from jlesage/cast_return_type
Fixed another 'return from incompatible pointer type' compiler warning (Thanks Jocelyn!)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user