Re: [Qemu-devel] [PATCH] sockets: Fix stringop-truncation warning

2019-04-03 Thread Philippe Mathieu-Daudé
On Wed, Apr 3, 2019 at 2:23 PM Daniel P. Berrangé wrote: > On Wed, Apr 03, 2019 at 02:16:20PM +0200, Philippe Mathieu-Daudé wrote: > > Compiling with clang-8 fails with: > > > > CC util/qemu-sockets.o > > util/qemu-sockets.c: In function 'unix_connect_saddr': > > util/qemu-sockets.c:9

Re: [Qemu-devel] [PATCH] sockets: Fix stringop-truncation warning

2019-04-03 Thread Daniel P . Berrangé
On Wed, Apr 03, 2019 at 02:16:20PM +0200, Philippe Mathieu-Daudé wrote: > Compiling with clang-8 fails with: > > CC util/qemu-sockets.o > util/qemu-sockets.c: In function 'unix_connect_saddr': > util/qemu-sockets.c:925:5: error: 'strncpy' specified bound 108 equals > destination size

[Qemu-devel] [PATCH] sockets: Fix stringop-truncation warning

2019-04-03 Thread Philippe Mathieu-Daudé
Compiling with clang-8 fails with: CC util/qemu-sockets.o util/qemu-sockets.c: In function 'unix_connect_saddr': util/qemu-sockets.c:925:5: error: 'strncpy' specified bound 108 equals destination size [-Werror=stringop-truncation] strncpy(un.sun_path, saddr->path, sizeof(un.su