I have defined as below:
FAKE_VALUE_FUNC(int, redisClusterAsyncFormattedCommand, redisClusterAsyncContext , redisClusterCallbackFn , void , char , int);
I am getting below compilation issues:
error: expected ‘,’ or ‘...’ before ‘void’
FAKE_VALUE_FUNC(int, redisClusterAsyncFormattedCommand, redisClusterAsyncContext , redisClusterCallbackFn , void , char , int);
error: ‘arg2’ was not declared in this scope
memcpy((void)&FUNCNAME##_fake.arg##n##_val, (void)&arg##n, sizeof(arg##n));
error: ‘arg3’ was not declared in this scope
memcpy((void)&FUNCNAME##_fake.arg##n##_val, (void)&arg##n, sizeof(arg##n));
error: ‘arg4’ was not declared in this scope
memcpy((void)&FUNCNAME##_fake.arg##n##_val, (void)&arg##n, sizeof(arg##n));
error: overloaded function with no contextual type information
FAKE_VALUE_FUNC(int, redisClusterAsyncFormattedCommand, redisClusterAsyncContext , redisClusterCallbackFn , void , char , int);
^
I am Trying to fake the below function using FFF and getting below compilation issue.
int redisClusterAsyncFormattedCommand(redisClusterAsyncContext acc, redisClusterCallbackFn fn, void privdata, char cmd, int len);
typedef void (redisClusterCallbackFn)(struct redisClusterAsyncContext, void, void*);
I have defined as below: FAKE_VALUE_FUNC(int, redisClusterAsyncFormattedCommand, redisClusterAsyncContext , redisClusterCallbackFn , void , char , int);
I am getting below compilation issues: error: expected ‘,’ or ‘...’ before ‘void’ FAKE_VALUE_FUNC(int, redisClusterAsyncFormattedCommand, redisClusterAsyncContext , redisClusterCallbackFn , void , char , int);
error: ‘arg2’ was not declared in this scope memcpy((void)&FUNCNAME##_fake.arg##n##_val, (void)&arg##n, sizeof(arg##n));
error: ‘arg3’ was not declared in this scope memcpy((void)&FUNCNAME##_fake.arg##n##_val, (void)&arg##n, sizeof(arg##n));
error: ‘arg4’ was not declared in this scope memcpy((void)&FUNCNAME##_fake.arg##n##_val, (void)&arg##n, sizeof(arg##n));
error: overloaded function with no contextual type information FAKE_VALUE_FUNC(int, redisClusterAsyncFormattedCommand, redisClusterAsyncContext , redisClusterCallbackFn , void , char , int); ^