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

build: Fix some unused variable warnings #13987

Merged
merged 1 commit into from
Nov 12, 2020
Merged

build: Fix some unused variable warnings #13987

merged 1 commit into from
Nov 12, 2020

Conversation

tbarrella
Copy link
Contributor

Commit Message: build: Fix some unused variable warnings
Additional Description:
Risk Level: Low
Testing: bazel build
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features:

Signed-off-by: Taylor Barrella <tabarr@google.com>
Copy link
Contributor

@antoniovicente antoniovicente left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the cleanup!

Copy link
Contributor

@lambdai lambdai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw _ is used else where. e.g.

    auto [_, inserted] = timer_map.insert(std::make_pair(timer_type, minimum));

Since you didn't fix the _ it means _ could be massage the compiler and avoid the UNREFERENCED_PARAMETER

include/envoy/registry/registry.h Show resolved Hide resolved
source/common/config/new_grpc_mux_impl.cc Show resolved Hide resolved
source/common/init/manager_impl.cc Show resolved Hide resolved
source/common/router/scoped_rds.cc Show resolved Hide resolved
source/server/admin/config_dump_handler.cc Show resolved Hide resolved
source/server/admin/config_dump_handler.cc Show resolved Hide resolved
source/server/admin/config_dump_handler.cc Show resolved Hide resolved
source/server/filter_chain_manager_impl.cc Show resolved Hide resolved
@antoniovicente
Copy link
Contributor

I saw _ is used else where. e.g.

    auto [_, inserted] = timer_map.insert(std::make_pair(timer_type, minimum));

Since you didn't fix the _ it means _ could be massage the compiler and avoid the UNREFERENCED_PARAMETER

_ is not special in C++. There's examples of UNREFERENCED_PARAMETER(_); in the envoy codebase, for example:

https://github.com/envoyproxy/envoy/blob/master/test/server/filter_chain_benchmark_test.cc#L250

@tbarrella
Copy link
Contributor Author

Yeah, the compiler complained about _ too.. this only does some warnings; I'd given up

@lambdai
Copy link
Contributor

lambdai commented Nov 12, 2020

I saw _ is used else where. e.g.

    auto [_, inserted] = timer_map.insert(std::make_pair(timer_type, minimum));

Since you didn't fix the _ it means _ could be massage the compiler and avoid the UNREFERENCED_PARAMETER

_ is not special in C++. There's examples of UNREFERENCED_PARAMETER(_); in the envoy codebase, for example:

https://github.com/envoyproxy/envoy/blob/master/test/server/filter_chain_benchmark_test.cc#L250

Interesting. That line is added by me...

Then renaming to "_" doesn't make much sense.

I am not sure which compiler is complaining but this PR is good

@mattklein123 mattklein123 merged commit 2bbad81 into envoyproxy:master Nov 12, 2020
@tbarrella tbarrella deleted the unused-variable branch November 12, 2020 21:41
cpakulski pushed a commit to cpakulski/envoy that referenced this pull request Dec 22, 2020
Signed-off-by: Taylor Barrella <tabarr@google.com>
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
antoniovicente pushed a commit that referenced this pull request Dec 29, 2020
… event. (#13858) (#14452)

Fixes #13856.

This change also contains the following backports:
- build: Fix some unused variable warnings (#13987)
- test: Check in all TLS test certs (#13702)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
istio-testing pushed a commit to istio/envoy that referenced this pull request Feb 5, 2021
* backport to 1.16: http: fixing a bug with IPv6 hosts (envoyproxy#14238)

Fixing a bug where HTTP parser offsets for IPv6 hosts did not include [] and Envoy assumed it did.
This results in mis-parsing addresses for IPv6 CONNECT requests and IPv6 hosts in fully URLs over HTTP/1.1

Risk Level: low
Testing: new unit, integration tests
Docs Changes: n/a
Release Notes: inline
Signed-off-by: Shikugawa <rei@tetrate.io>
Co-authored-by: alyssawilk <alyssar@chromium.org>

* backport to 1.16: vrp: allow supervisord to open its log file (envoyproxy#14066) (envoyproxy#14279)

Commit Message: Allow supervisord to open its log file
Additional Description:
Change the default location of the log file and give supervisord
permissions to write to it.

Risk Level: low
Testing: built image locally
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Alex Konradi <akonradi@google.com>
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>

* Closing release 1.16.2. (envoyproxy#14308)

Signed-off-by: Christoph Pakulski <christoph@tetrate.io>

* Kick-off rel 1.16.3. (envoyproxy#14321)

Signed-off-by: Christoph Pakulski <christoph@tetrate.io>

* lua: reset downstream_ssl_connection in StreamInfoWrapper when object is marked dead by Lua GC (envoyproxy#14092) (envoyproxy#14449)

Co-authored-by: Marcin Falkowski <marcin.falkowski@allegro.pl>

* backport to 1.16: tls: fix detection of the upstream connection close event. (envoyproxy#13858) (envoyproxy#14452)

Fixes envoyproxy#13856.

This change also contains the following backports:
- build: Fix some unused variable warnings (envoyproxy#13987)
- test: Check in all TLS test certs (envoyproxy#13702)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>

* backport to 1.16: aggregate cluster: fix TLS init issue (envoyproxy#14456)

Additional Description: Based on envoyproxy#14388
Risk Level: Low
Testing: Build and run the repro from envoyproxy#14119 without crashing, `bazel test test/extensions/clusters/aggregate:cluster_test`
Docs Changes: N/A
Release Notes:
envoyproxy#14119

Signed-off-by: Taylor Barrella <tabarr@google.com>

Co-authored-by: Rei Shimizu <rei@tetrate.io>
Co-authored-by: Christoph Pakulski <christoph@tetrate.io>
Co-authored-by: Marcin Falkowski <marcin.falkowski@allegro.pl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants