From 4cca3a677b9a857cfbda996b27bc2355e9a1af29 Mon Sep 17 00:00:00 2001 From: Daniel Xu Date: Wed, 26 Jun 2024 11:27:18 -0600 Subject: [PATCH] Remove unused member variables Nix build is reporting two warnings about unused variables. They are indeed unused, so remove. --- src/ast/passes/codegen_llvm.h | 1 - src/config.cpp | 2 +- src/config.h | 3 +-- src/main.cpp | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/ast/passes/codegen_llvm.h b/src/ast/passes/codegen_llvm.h index aa17f099..bbdbb3fa 100644 --- a/src/ast/passes/codegen_llvm.h +++ b/src/ast/passes/codegen_llvm.h @@ -276,7 +276,6 @@ class CodegenLLVM : public Visitor { // Used if there are duplicate USDT entries int current_usdt_location_index_{ 0 }; bool inside_subprog_ = false; - bool need_recursion_check_ = false; std::map variables_; diff --git a/src/config.cpp b/src/config.cpp index 550ca900..27344a7d 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -8,7 +8,7 @@ namespace bpftrace { -Config::Config(bool has_cmd, bool bt_verbose) : bt_verbose_(bt_verbose) +Config::Config(bool has_cmd) { config_map_ = { { ConfigKeyBool::cpp_demangle, { .value = true } }, diff --git a/src/config.h b/src/config.h index 7c097f2d..497cda6e 100644 --- a/src/config.h +++ b/src/config.h @@ -108,7 +108,7 @@ struct ConfigValue { class Config { public: - explicit Config(bool has_cmd = false, bool bt_verbose = false); + explicit Config(bool has_cmd = false); bool get(ConfigKeyBool key) const { @@ -181,7 +181,6 @@ class Config { private: bool can_set(ConfigSource prevSource, ConfigSource); bool is_aslr_enabled(); - bool bt_verbose_ = false; std::map config_map_; }; diff --git a/src/main.cpp b/src/main.cpp index 897f44c9..b0202412 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -724,7 +724,7 @@ int main(int argc, char* argv[]) libbpf_set_print(libbpf_print); - Config config = Config(!args.cmd_str.empty(), bt_verbose); + Config config = Config(!args.cmd_str.empty()); BPFtrace bpftrace(std::move(output), args.no_feature, config); if (!args.cmd_str.empty())