diff --git a/lib/cmock_generator_utils.rb b/lib/cmock_generator_utils.rb index 58c0a84..e131e7e 100644 --- a/lib/cmock_generator_utils.rb +++ b/lib/cmock_generator_utils.rb @@ -82,7 +82,7 @@ class CMockGeneratorUtils unity_msg = (unity_func =~ /_MESSAGE/) ? ", #{msg}" : '' if (unity_func == "TEST_ASSERT_EQUAL_MEMORY_MESSAGE") full_expected = (expected.strip[0] == 42) ? expected.slice(1..-1) : "&(#{expected})" - return "#{unity_func}(#{full_expected}, &(#{actual}), sizeof(#{c_type})#{unity_msg})" + return "#{unity_func}((void*)#{full_expected}, (void*)&(#{actual}), sizeof(#{c_type})#{unity_msg})" else return "#{unity_func}(#{expected}, #{actual}#{unity_msg})" end