| ud.free_func = (void *) memcached_free;
| ^ line 559, memcached.c
assignment type mismatch:
pointer to function(pointer to void) returning void "=" pointer to void
Casting a function pointer to a void pointer is undefined behaviour
in C (it is defined in POSIX however)
static _Bool memcached_have_instances = 0;
-static void memcached_free (memcached_t *st)
+static void memcached_free (void *arg)
{
+ memcached_t *st = arg;
if (st == NULL)
return;
memset (&ud, 0, sizeof (ud));
ud.data = st;
- ud.free_func = (void *) memcached_free;
+ ud.free_func = memcached_free;
assert (st->name != NULL);
ssnprintf (callback_name, sizeof (callback_name), "memcached/%s", st->name);