Rewrite the code that it is correct and cast everything correctly. That's what
should be done...
-- andreas
#define expect_string(function, parameter, string) \
expect_string_count(function, parameter, string, 1)
#define expect_string_count(function, parameter, string, count) \
_expect_string(#function, #parameter, __FILE__, __LINE__, (void*)string, \
count)
Here's the prototype for _expect_string (from cmockery.h):
void _expect_string(
const char* const function, const char* const parameter,
const char* const file, const int line, const char* string,
const int count);
The expect_string_count macro is casting the "string" argument to
void*, and that argument is const char* in the _expect_string
function.
For now, I'm going to try #undef expect_string_count and then redefine
it without the cast (as described in one answer to my StackOverflow
question). Though I'd be happy to submit a patch using #if
__cplusplus, if the committers think it's worth the work.
--
Daryl
> --
> You received this message because you are subscribed to the Google Groups "Cmockery" group.
> To post to this group, send email to cmoc...@googlegroups.com.
> To unsubscribe from this group, send email to cmockery+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cmockery?hl=en.
>