]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD/MINOR: unix sockets: silence an absurd gcc warning about strncpy()
authorWilly Tarreau <w@1wt.eu>
Wed, 11 Dec 2019 15:29:10 +0000 (16:29 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 11 Dec 2019 15:29:10 +0000 (16:29 +0100)
commit719e07c989be48a69fcfcaa404d12d7478de8a1b
tree0fe84c172de6fbe34c575f0d752be196ee73fe74
parentfec56c6a76463d40be3e15eee297aa8d2b67362a
BUILD/MINOR: unix sockets: silence an absurd gcc warning about strncpy()

Apparently gcc developers decided that strncpy() semantics are no longer
valid and now deserve a warning, especially if used exactly as designed.
This results in issue #304. Let's just remove one to the target size to
please her majesty gcc, the God of C Compilers, who tries hard to make
users completely eliminate any use of string.h and reimplement it by
themselves at much higher risks. Pfff....

This can be backported to stable version, the fix is harmless since it
ignores the last zero that is already set on next line.
src/haproxy.c
src/proto_uxst.c