summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5a29f19)
raw | patch | inline | side by side (parent: 5a29f19)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 24 Jul 2016 11:41:00 +0000 (13:41 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 24 Jul 2016 11:44:47 +0000 (13:44 +0200) |
| 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)
| ^ 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)
src/memcached.c | patch | blob | history |
diff --git a/src/memcached.c b/src/memcached.c
index 62ac72a8029dac695632d1a26a3ad40f18ffeca9..54e3a1904ba43f178c9143688b7a2c567784a131 100644 (file)
--- a/src/memcached.c
+++ b/src/memcached.c
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);