Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnsdist: Unused lambda capture warnings and unused function warning in dnsdist-lua.cc #7950

Closed
pieterlexis opened this issue Jun 19, 2019 · 1 comment

Comments

@pieterlexis
Copy link
Member

@pieterlexis pieterlexis commented Jun 19, 2019

  • Program: dnsdist
  • Issue type: Bug report

Short description

compiler warning on dnsdist-lua.cc

Environment

  • Operating system: Arch Linux
  • Software version: git (d26856a)
  • Software source: git

Steps to reproduce

autoreconf -fi
CXX=clang++ CC=clang LD=lld ./configure
make

Expected behaviour

No warnings

Actual behaviour

dnsdist-lua.cc:1642:39: warning: lambda capture 'client' is not used [-Wunused-lambda-capture]
  g_lua.writeFunction("addDOHLocal", [client](const std::string& addr, boost::variant<std::string, std::vector<std::pair<int,std::string>>> certFiles, boost::variant<std::string, std::vector<std::pair<int,std::string>>> keyFiles, boost::optional<boost::variant<std::string, vector<pair<int, std::string> > > > urls, boost::optional<localbind_t> vars) {
                                      ^~~~~~
dnsdist-lua.cc:1756:39: warning: lambda capture 'client' is not used [-Wunused-lambda-capture]
  g_lua.writeFunction("addTLSLocal", [client](const std::string& addr, boost::variant<std::string, std::vector<std::pair<int,std::string>>> certFiles, boost::variant<std::string, std::vector<std::pair<int,std::string>>> keyFiles, boost::optional<localbind_t> vars) {
                                      ^~~~~~
dnsdist-lua.cc:112:13: warning: unused function 'loadTLSCertificateAndKeys' [-Wunused-function]
static bool loadTLSCertificateAndKeys(const std::string& context, std::vector<std::pair<std::string, std::string>>& pairs, boost::variant<std::string, std::vector<std::pair<int,std::string>>> certFiles, boost::variant<std::string, std::vector<std::pair<int,std::string>>> keyFiles)
            ^
3 warnings generated.
@rgacogne
Copy link
Member

@rgacogne rgacogne commented Jun 19, 2019

Note that those are used if you enable DoH and DoT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants