mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-06-05 21:15:20 +00:00
Always cast memcpy dest pointers to const void
This commit is contained in:
@@ -76,7 +76,7 @@ class CMockGeneratorUtils
|
||||
else
|
||||
assert_expr = "sizeof(#{arg[:name]}) == sizeof(#{arg[:type]}) ? 1 : -1"
|
||||
comment = "/* add #{arg[:type]} to :treat_as_array if this causes an error */"
|
||||
" memcpy((void*)(&#{dest}), (void*)(&#{arg[:name]}),\n" \
|
||||
" memcpy((void*)(&#{dest}), (const void*)(&#{arg[:name]}),\n" \
|
||||
" sizeof(#{arg[:type]}[#{assert_expr}])); #{comment}\n"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user