Mock generation by the Return_Thru_Ptr plugin can result in a sizeof(void) expression to be generated if a mocked function contains a void*-argument.
A previous implementation (some versions ago) generated the resulting mock with a sizeof(*<parameter name>), the current implementation uses sizeof(<typename without ptr>) if the parameter is a pointer.
This pull request adds a check to verify that the argument type is not a pointer to void, if it is then sizeof(*<parameter name>) will be generated. For me this fixes the issue.
Im no professional ruby developer so im always happy for feedback :)
Mock generation by the Return_Thru_Ptr plugin can result in a
sizeof(void)
expression to be generated if a mocked function contains avoid*
-argument.A previous implementation (some versions ago) generated the resulting mock with a
sizeof(*<parameter name>)
, the current implementation usessizeof(<typename without ptr>)
if the parameter is a pointer.This pull request adds a check to verify that the argument type is not a pointer to void, if it is then
sizeof(*<parameter name>)
will be generated. For me this fixes the issue.Im no professional ruby developer so im always happy for feedback :)
Relevant issue: https://github.com/ThrowTheSwitch/Ceedling/issues/795