I work as developer and I prefer to use CMocka tool to provide UnitTesting for C language.
It's simple tool based on GTest (mostly C++ unit testing) and it's really easy to understand.
Some time ago I made a research for the best and the simplest testing tool and decided to this.
And after some time working with this I am really confident. With using preprocessor directives
#define MyFunction(iEntry) mock_MyFunction(iEntry)
you can also cut-off any function you want to simulate (even basic windows functions like sizeof(), malloc() and so on).
After this step you only have to create your mock functions (mock_MyFunction(iEntry)), include them into your project and simulate their behaviour.
Prefered way is to set them some values before calling they should return ( will_return_always(mock_MyFunction, 5) ). And when this function is called, it will always return value 5.
Also you can totally avoid C++ language and stay working with plain C language.
Dont be aware of simple index site of CMocka. You have to dive into that site and API of tool to find what you need.. :)
Also check this for little tutorial of using CMocka...
I hope this helps, have a nice day.. :-)