]> git.ipfire.org Git - thirdparty/squid.git/commit
Bug 3911: clang -fsanitize warnings (#125)
authorAmos Jeffries <yadij@users.noreply.github.com>
Mon, 15 Jan 2018 18:59:37 +0000 (07:59 +1300)
committerGitHub <noreply@github.com>
Mon, 15 Jan 2018 18:59:37 +0000 (07:59 +1300)
commit43b6575c9823248357a1eca8a55db76fd6c848ca
tree2d7e569312d06e83c2e5141a648a6383c140609b
parent205f23455383421e227ad59211fca3eb40fe52c5
Bug 3911: clang -fsanitize warnings (#125)

Fixes warnings from clang when -fsanitize is used. Many of these are also part of the bug 4738 issues.

    error: private field 'callback' is not used [-Werror,-Wunused-private-field]
    error: private field 'cbdata' is not used [-Werror,-Wunused-private-field]
    error: private field 'IO' is not used [-Werror,-Wunused-private-field]
    error: variable 'wccp2_router_id_element' is not needed and
    will not be emitted [-Werror,-Wunneeded-internal-declaration]

We cannot set these warnings as default options yet because the STUB code intentionally does not use any private class members, so it would error on every unit test.

* Convert Store::LocalSearch to C++ initialization

* DiskThreadsDiskFile::IO is unused after setting by the constructor

Also, take the opportunity to redo the construct using C++11 initialization

* Remove currently unused wccp2_router_id_element

This resolves clang warnings until the WCCP redesign is completed.
src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc
src/DiskIO/DiskThreads/DiskThreadsDiskFile.h
src/DiskIO/DiskThreads/DiskThreadsIOStrategy.cc
src/store/LocalSearch.cc
src/wccp2.cc