Skip to content

Commit

Permalink
[ntuple] Initialize variables to silence compiler warnings
Browse files Browse the repository at this point in the history
Clang warns that "variable 'px' may be uninitialized when used here"
because it does not understand the interplay with RNTupleView.
  • Loading branch information
hahnjo committed Oct 14, 2024
1 parent 3425eb7 commit 153c6b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tree/ntuple/v7/test/ntuple_view.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ TEST(RNTuple, ViewFrameworkUse)
std::optional<ROOT::Experimental::RNTupleView<void>> viewPy;
std::optional<ROOT::Experimental::RNTupleView<void>> viewPz;

float px, py, pz;
float px = 0, py = 0, pz = 0;
for (auto i : reader->GetEntryRange()) {
if (i > 1) {
if (!viewPx) {
Expand Down

0 comments on commit 153c6b7

Please sign in to comment.