Closed dmcminniwc closed 7 years ago
That is a good finding. Thanks! I'm going to fix that and open a pull request.
Can you please check my pull request, if it is working as intended? https://github.com/meekrosoft/fff/pull/27
Another great one - thanks both!
If I use any of the FAKE_*_FUNC0 variants then fff declares functions which take any number of parameters because it uses an empty parameter list. For example, if there is a function
foo
which has no arguments and returns nothing then usingFAKE_VOID_FUNC0(foo);
eventually ends up with a function declaration:If I have an existing header for the code under test that declares foo as:
because, really foo doesn't have any arguments and I want to ensure the compiler catches me trying to pass the wrong number of arguments instead of just accepting any and (possibly) leading to subtle runtime bugs. However that is then in conflict with the declaration from fff and you get compiler warnings (IAR by default, MSVC must enable all warnings).
Would it be possible to use void instead of an empty parameter list? This would apply to all the other no-argument functions such as the custom delegate, custom delegate sequence and reset functions.