I have a header file in my project which contains structure declaration in it. Some fields there are pointers to the functions. See the following example:
So, it's no surprise the compiler cannot deal with it.
A little study showed, that it is "void*" return value type for some functions is the root cause of this issue. It somehow confuses CMock and makes it generate aforementioned weird stuff. Moreover, any other "pointer to" type does the same job.
It is possible to work around this issue by declaring a custom "typedef" for either a structure member function or return type. But maybe you will find some time to fix it natively.
Hello!
I have a header file in my project which contains structure declaration in it. Some fields there are pointers to the functions. See the following example:
If feed such header to the CMock then:
If open a generated file, one may see something like this:
So, it's no surprise the compiler cannot deal with it.
A little study showed, that it is "void*" return value type for some functions is the root cause of this issue. It somehow confuses CMock and makes it generate aforementioned weird stuff. Moreover, any other "pointer to" type does the same job.
It is possible to work around this issue by declaring a custom "typedef" for either a structure member function or return type. But maybe you will find some time to fix it natively.
Thanks for great tool and good luck!