Skip to content

Commit

Permalink
Remove unused member variables
Browse files Browse the repository at this point in the history
Nix build is reporting two warnings about unused variables. They are
indeed unused, so remove.
  • Loading branch information
danobi committed Jun 26, 2024
1 parent 3e915ae commit 4cca3a6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/ast/passes/codegen_llvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string, AllocaInst *> variables_;

Expand Down
2 changes: 1 addition & 1 deletion src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 } },
Expand Down
3 changes: 1 addition & 2 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -181,7 +181,6 @@ class Config {
private:
bool can_set(ConfigSource prevSource, ConfigSource);
bool is_aslr_enabled();
bool bt_verbose_ = false;

std::map<ConfigKey, ConfigValue> config_map_;
};
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 4cca3a6

Please sign in to comment.