svunit / svmock

A mock framework for use with SVUnit
Apache License 2.0
15 stars 4 forks source link

'returns()' function should be void #2

Closed tudortimi-ifx closed 6 years ago

tudortimi-ifx commented 6 years ago

When doing a `ON_CALL(mock, some_func).returns(some_val), the value returned by the 'returns()' function is not needed. The function is declared as returning a value of the type the mocked function returns. It could be declared as 'void'.

This code causes issues when compiling with the stricter ruleset that returned values are either used or explicitly ignored (in IUS, '-ncerror FUNTSK').

nosnhojn commented 6 years ago

fixed in https://github.com/nosnhojn/svmock/commit/6f926fecfbc9607c5dc0d44c75ce3b8c567a3523