[PATCH] CTDB fixes in sock_daemon and socket I/O code

Amitay Isaacs amitay at gmail.com
Thu Jan 5 00:06:43 UTC 2017


On Thu, Jan 5, 2017 at 9:45 AM, Martin Schwenke <martin at meltin.net> wrote:

> On Thu, 5 Jan 2017 00:54:30 +1100, Amitay Isaacs <amitay at gmail.com>
> wrote:
>
> > Here are the fixes to sock_daemon and sock_io abstractions with tests.
> >
> > This should fix the flakey ctdb autobuild.
> >
> > Please review and push.
>
> The 4th commit breaks the -O3 developer build:
>
> [194/292] Compiling tests/src/sock_io_test.c
> ../tests/src/sock_io_test.c: In function ‘test1_writer’:
> ../tests/src/sock_io_test.c:64:3: error: dereferencing type-punned
> pointer will break strict-aliasing rules [-Werror=strict-aliasing]
>    *(uint32_t *)buf = buflen;
>    ^
> ../tests/src/sock_io_test.c: In function ‘test2_writer’:
> ../tests/src/sock_io_test.c:195:3: error: dereferencing type-punned
> pointer will break strict-aliasing rules [-Werror=strict-aliasing]
>    *(uint32_t *)buf = buflen;
>    ^
> cc1: all warnings being treated as errors
>
> :-(
>
>
Good catch.  Here are the patches again with fixes for O3 build.

Also pushed to my ctdb-eventd branch.

Amitay.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ctdb.patches
Type: application/octet-stream
Size: 20380 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170105/bcbef27c/ctdb.obj>


More information about the samba-technical mailing list