]> git.ipfire.org Git - thirdparty/squid.git/commit
Fix GCC-9 build issues (#413)
authorAmos Jeffries <yadij@users.noreply.github.com>
Sat, 8 Jun 2019 11:40:40 +0000 (11:40 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sat, 8 Jun 2019 11:40:44 +0000 (11:40 +0000)
commit4f3c41b313b474c33479ef11983117e75939b0fb
tree7d9523dc83fc8b8b1a129249bf0bba56357143cb
parent64df2bff6a9bab3fb0f8882a929022d53346b231
Fix GCC-9 build issues (#413)

GCC-9 continues the development track started with GCC-8
producing more warnings and errors about possible code issues
which Squid use of "-Wall -Werror" turns into hard build
failures:

 error: ‘strncpy’ output may be truncated copying 6 bytes from a
   string of length 6 [-Werror=stringop-truncation]

 error: ‘%s’ directive argument is null
  [-Werror=format-overflow=]

 error: ‘void* memset(void*, int, size_t)’ clearing an object of
  type ... with no trivial copy-assignment; use assignment or
  value-initialization instead [-Werror=class-memaccess]

 error: ‘void* memset(void*, int, size_t)’ clearing an object of
  non-trivial type ...; use assignment or value-initialization
  instead [-Werror=class-memaccess]

Also, segmentation faults with minimal builds have been
identified as std::string template differences between
optimized and non-optimized object binaries. This results in
cppunit (built with optimizations) crashing unit tests when
freeing memory. Workaround that temporarily by removing the use
of --disable-optimizations from minimal builds.
12 files changed:
lib/html_quote.c
src/StoreStats.cc
src/StoreStats.h
src/StoreSwapLogData.cc
src/StoreSwapLogData.h
src/auth/negotiate/kerberos/negotiate_kerberos_auth.cc
src/ipc/SharedListen.cc
src/ipc/SharedListen.h
src/mgr/InfoAction.cc
src/mgr/InfoAction.h
src/tests/stub_store_stats.cc
test-suite/buildtests/layer-01-minimal.opts