Skip to content

Commit

Permalink
[ntuple] ignore warning about unused functions in RColumnElement.hxx
Browse files Browse the repository at this point in the history
Those functions need to be defined static to avoid violating ODR in
the ntuple_endian, that includes the file while changing the endianness,
ending up with a different definition of those functions.
  • Loading branch information
silverweed committed Nov 13, 2024
1 parent 303a4e8 commit c826c8b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tree/ntuple/v7/src/RColumnElement.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,6 @@ inline void CastZigzagSplitUnpack(void *destination, const void *source, std::si
dst[i] = sval;
}
}
} // namespace

// anonymous namespace because these definitions are not meant to be exported.
namespace {

using ROOT::Experimental::EColumnType;
using ROOT::Experimental::Internal::RColumnElementBase;
Expand Down Expand Up @@ -1092,6 +1088,8 @@ public:

RColumnElementQuantized() : RColumnElementBase(kSize, 0) {}

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function"
void SetBitsOnStorage(std::size_t bitsOnStorage) final

Check warning on line 1093 in tree/ntuple/v7/src/RColumnElement.hxx

View workflow job for this annotation

GitHub Actions / alma8 LLVM_ENABLE_ASSERTIONS=On

‘void {anonymous}::RColumnElementQuantized<T>::SetBitsOnStorage(std::size_t) [with T = double]’ declared ‘static’ but never defined [-Wunused-function]

Check warning on line 1093 in tree/ntuple/v7/src/RColumnElement.hxx

View workflow job for this annotation

GitHub Actions / alma8 LLVM_ENABLE_ASSERTIONS=On

‘void {anonymous}::RColumnElementQuantized<T>::SetBitsOnStorage(std::size_t) [with T = float]’ declared ‘static’ but never defined [-Wunused-function]
{
const auto [minBits, maxBits] = GetValidBitRange(EColumnType::kReal32Quant);
Expand All @@ -1105,6 +1103,7 @@ public:
R__ASSERT(max <= std::numeric_limits<T>::max());
fValueRange = {min, max};
}
#pragma GCC diagnostic pop

bool IsMappable() const final { return kIsMappable; }

Expand Down

0 comments on commit c826c8b

Please sign in to comment.