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

Fix -WShadow warnings #8440

Merged
merged 13 commits into from Nov 11, 2019

Conversation

@cmouse
Copy link
Contributor

cmouse commented Oct 19, 2019

Short description

Fix lots of shadowing variables

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)
  • checked that this code was merged to master
@cmouse cmouse force-pushed the cmouse:shadow branch from 779304c to d5ba82d Oct 19, 2019
pdns/opensslsigners.cc Outdated Show resolved Hide resolved
@cmouse cmouse force-pushed the cmouse:shadow branch 4 times, most recently from eb8c8c7 to 97c0ee3 Oct 21, 2019
Copy link
Member

rgacogne left a comment

Looks good, thanks! I'm just worried about this PR making us call std::bitset::count() in the condition of a for-loop.

pdns/nsecrecords.cc Outdated Show resolved Hide resolved
pdns/nsecrecords.cc Outdated Show resolved Hide resolved
cmouse added 13 commits Oct 19, 2019
json.hh:39:42: warning: declaration of ‘what’ shadows a member of 'this' [-Wshadow]
nsecrecords.cc:79:12: warning: declaration of ‘count’ shadows a member of 'this' [-Wshadow]
nsecrecords.cc:141:12: warning: declaration of ‘count’ shadows a member of 'this' [-Wshadow]
e.g.
opensslsigners.cc:761:10: warning: declaration of ‘hash’ shadows a member of 'this' [-Wshadow]
It should be msg not hash
odbxprivate.cc:190:138: warning: declaration of 'list' shadows a member of 'this'
smysql.cc:458:13: warning: declaration of 'reconnect' shadows a member of 'this'
coprocess.cc:161:40: warning: declaration of 'receive' shadows a member of 'this'
iputils.hh:785:32: warning: declaration of 'parent' shadows a global declaration
dnsdist.hh:668:147: warning: declaration of 'isTCP' shadows a member of 'this'
rfc2136handler.cc:616:30: warning: declaration of 'forwardPacket' shadows a member of 'this'
rfc2136handler.cc:616:30: warning: declaration of 'forwardPacket' shadows a member of 'this'
webserver.hh:128:36: warning: declaration of 'what' shadows a member of 'this'
speedtest.cc:603:25: warning: declaration of 'rr' shadows a previous local
@cmouse cmouse force-pushed the cmouse:shadow branch from 97c0ee3 to bdecca3 Oct 29, 2019
@omoerbeek omoerbeek requested a review from rgacogne Oct 30, 2019
@pieterlexis pieterlexis merged commit 19f3ec6 into PowerDNS:master Nov 11, 2019
27 checks passed
27 checks passed
LGTM analysis: JavaScript No code changes detected
Details
LGTM analysis: Python No code changes detected
Details
LGTM analysis: C/C++ No new or fixed alerts
Details
ci/circleci: build-auth Your tests passed on CircleCI!
Details
ci/circleci: build-auth-docs Your tests passed on CircleCI!
Details
ci/circleci: build-dnsdist Your tests passed on CircleCI!
Details
ci/circleci: build-dnsdist-docs Your tests passed on CircleCI!
Details
ci/circleci: build-recursor Your tests passed on CircleCI!
Details
ci/circleci: build-recursor-docs Your tests passed on CircleCI!
Details
ci/circleci: checkout Your tests passed on CircleCI!
Details
ci/circleci: test-auth-algorithms Your tests passed on CircleCI!
Details
ci/circleci: test-auth-api Your tests passed on CircleCI!
Details
ci/circleci: test-auth-regress-bind Your tests passed on CircleCI!
Details
ci/circleci: test-auth-regress-gmysql Your tests passed on CircleCI!
Details
ci/circleci: test-auth-regress-gpgsql Your tests passed on CircleCI!
Details
ci/circleci: test-auth-regress-gsqlite3 Your tests passed on CircleCI!
Details
ci/circleci: test-auth-regress-ldap Your tests passed on CircleCI!
Details
ci/circleci: test-auth-regress-lmdb Your tests passed on CircleCI!
Details
ci/circleci: test-auth-regress-odbc-mssql Your tests passed on CircleCI!
Details
ci/circleci: test-auth-regress-odbc-sqlite3 Your tests passed on CircleCI!
Details
ci/circleci: test-auth-regress-tinydns Your tests passed on CircleCI!
Details
ci/circleci: test-dnsdist-regression Your tests passed on CircleCI!
Details
ci/circleci: test-ixfrdist-regression Your tests passed on CircleCI!
Details
ci/circleci: test-recursor-api Your tests passed on CircleCI!
Details
ci/circleci: test-recursor-bulk Your tests passed on CircleCI!
Details
ci/circleci: test-recursor-regression Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.