google / google/bloaty

Unused variable and generally suspicious code in `bloaty.cc`

Open
#490 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5.5k
Forks
378
Avg merge
23h 54m
Merged PRs (30d)
6

Description

Compiling raises a "variable set but not used" warning for `filtered` in `bloaty.cc` here:
https://github.com/google/bloaty/blob/073e01d04fc06d64eeb5cdb9adeae035a34e4b13/src/bloaty.cc#L828-L854
But also, `file_filtered` and `vm_filtered` are initialized to 0, and then never updated... so the condition on line 838 is always true, and everything below is dead code? I'm not sure if I'm missing something. I'm not familiar with bloaty internals, so I'm not sure what the right fix is, but just wanted to let you know about this.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.