Skip to content

Commit

Permalink
bloom_test: fix compilation error with GCC 12 (#136)
Browse files Browse the repository at this point in the history
When compiling bloom_test with GCC 12 it complains about using uninitialised
variables. The error is technically wrong, since only the address is taken,
but since this is a test and there's no performance penalty, initialise
the member to get rid of the error.
  • Loading branch information
isaac-io committed Aug 24, 2022
1 parent a618a8b commit f74c31a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/bloom_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ struct RawFilterTester {
// Points five bytes from the end
char* metadata_ptr_;

RawFilterTester() : metadata_ptr_(&*(data_.end() - 5)) {}
RawFilterTester() : data_(), metadata_ptr_(&*(data_.end() - 5)) {}

Slice ResetNoFill(uint32_t len_without_metadata, uint32_t num_lines,
uint32_t num_probes) {
Expand Down

0 comments on commit f74c31a

Please sign in to comment.