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

Fix last remaining C++ warnings #8160

Merged
merged 4 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions rerun_cpp/src/rerun/recording_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <arrow/buffer.h>

#include <cassert>
#include <string> // to_string
#include <vector>

Expand All @@ -18,6 +19,9 @@ namespace rerun {

case StoreKind::Blueprint:
return RR_STORE_KIND_BLUEPRINT;

default:
assert(false && "unreachable");
}

// This should never happen since if we missed a switch case we'll get a warning on
Expand Down
3 changes: 3 additions & 0 deletions tests/cpp/plot_dashboard_stress/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,12 @@ int main(int argc, char** argv) {

std::vector<size_t> offsets;
if (temporal_batch_size.has_value()) {
// GCC wrongfully thinks that `temporal_batch_size` is uninitialized despite being initialized upon creation.
RR_DISABLE_MAYBE_UNINITIALIZED_PUSH
for (size_t i = 0; i < num_points_per_series; i += *temporal_batch_size) {
offsets.push_back(i);
}
RR_DISABLE_MAYBE_UNINITIALIZED_POP
} else {
offsets.resize(sim_times.size());
std::iota(offsets.begin(), offsets.end(), 0);
Expand Down
Loading