ctdb-daemon: Fix some strict-aliasing warnings
commit6fd3ce53914c5c5aa79b972b42258c722b227b88
authorMartin Schwenke <martin@meltin.net>
Mon, 4 Aug 2014 04:50:17 +0000 (4 14:50 +1000)
committerAmitay Isaacs <amitay@samba.org>
Thu, 21 Aug 2014 02:46:13 +0000 (21 04:46 +0200)
treee0b50671191e1546be49ed5e1ff65324c7cb96d1
parent2807b185f438c40544d4fd133bc386e411b12d0c
ctdb-daemon: Fix some strict-aliasing warnings

Seeing these with -Wall:

  ../server/ctdb_call.c:1117:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     record_flags = *(uint32_t *)&c->data[c->keylen + c->datalen];
     ^

memcpy() seems to be the easiest way to get fix these.  The
alternative would be to use unmarshalling functions.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/common/ctdb_util.c
ctdb/server/ctdb_call.c