From 09f8b94cad0f57559cb14255ddf6870375b41106 Mon Sep 17 00:00:00 2001 From: silverweed Date: Fri, 18 Oct 2024 08:51:26 +0200 Subject: [PATCH] [ntuple] rearrange code to avoid a compiler warning --- tree/ntuple/v7/src/RNTupleSerialize.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tree/ntuple/v7/src/RNTupleSerialize.cxx b/tree/ntuple/v7/src/RNTupleSerialize.cxx index 9c182533ab0a4..4357e2153a41f 100644 --- a/tree/ntuple/v7/src/RNTupleSerialize.cxx +++ b/tree/ntuple/v7/src/RNTupleSerialize.cxx @@ -777,8 +777,10 @@ ROOT::Experimental::Internal::RNTupleSerializer::SerializeFieldStructure(ROOT::E case ENTupleStructure::kRecord: return SerializeUInt16(0x02, buffer); case ENTupleStructure::kVariant: return SerializeUInt16(0x03, buffer); case ENTupleStructure::kUnsplit: return SerializeUInt16(0x04, buffer); - case ROOT::Experimental::Internal::kTestFutureFieldStructure: return SerializeUInt16(0x99, buffer); - default: throw RException(R__FAIL("ROOT bug: unexpected field structure type")); + default: + if (structure == ROOT::Experimental::Internal::kTestFutureFieldStructure) + return SerializeUInt16(0x99, buffer); + throw RException(R__FAIL("ROOT bug: unexpected field structure type")); } }