From 153c6b7658cc7aa351cc1bbb1384dea54194ebdb Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Mon, 14 Oct 2024 15:40:40 +0200 Subject: [PATCH] [ntuple] Initialize variables to silence compiler warnings Clang warns that "variable 'px' may be uninitialized when used here" because it does not understand the interplay with RNTupleView. --- tree/ntuple/v7/test/ntuple_view.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tree/ntuple/v7/test/ntuple_view.cxx b/tree/ntuple/v7/test/ntuple_view.cxx index d3090766204f8..d7999c13ef849 100644 --- a/tree/ntuple/v7/test/ntuple_view.cxx +++ b/tree/ntuple/v7/test/ntuple_view.cxx @@ -307,7 +307,7 @@ TEST(RNTuple, ViewFrameworkUse) std::optional> viewPy; std::optional> viewPz; - float px, py, pz; + float px = 0, py = 0, pz = 0; for (auto i : reader->GetEntryRange()) { if (i > 1) { if (!viewPx) {