Skip to content
Snippets Groups Projects
Commit e939afdf authored by Pascal Raisig's avatar Pascal Raisig Committed by Pierre-Alain Loizeau
Browse files

Silence llu to lu conversion warnings on macos

parent b801618b
No related branches found
No related tags found
1 merge request!415Include all unpackers in the new /reco/steer/ based scheme
......@@ -181,9 +181,11 @@ Bool_t CbmCriGet4RawPrint::DoUnpack(const fles::Timeslice& ts, size_t /*componen
procEpochUntilError++;
if (lastGlobalEpoch != 0xFFFFFF) {
if ((lastGlobalEpoch + 1) != epoch) {
// Cast required to silence a warning on macos (there a uint64_t is a llu)
snprintf(buf, sizeof(buf),
"Error global epoch, last epoch, current epoch, diff 0x%06x 0x%06x %d 0x%016lx %d",
lastGlobalEpoch, epoch, lastGlobalEpoch - epoch, ulData, procEpochUntilError);
lastGlobalEpoch, epoch, lastGlobalEpoch - epoch, static_cast<size_t>(ulData),
procEpochUntilError);
std::cout << buf << std::endl;
procEpochUntilError = 0;
......
......@@ -195,7 +195,8 @@ bool CbmPsdUnpackAlgo::unpack(const fles::Timeslice* ts, std::uint16_t icomp, UI
while (PsdReader.GetTotalGbtWordsRead() < uNbMessages) {
int ReadResult = PsdReader.ReadMs();
if (fair::Logger::Logging(fair::Severity::debug)) {
printf("\nMicroslice idx: %lu\n", mstime);
// Cast requires to silence a warning on macos, there a uint64_t is a long long unsigned
printf("\nMicroslice idx: %lu\n", static_cast<size_t>(mstime));
PsdReader.PrintOut(); /*PsdReader.PrintSaveBuff();*/
}
if (ReadResult == 0) {
......
......@@ -299,11 +299,12 @@ void CbmTofUnpackAlgo::ProcessEpoch(const critof001::Message& mess, uint32_t uMe
}
if (ulEpochNr != ulMsStartInEpoch) {
// size_t required to silence a warning on macos (there a uint64_t is a llu)
LOG(error) << fName << "::ProcessEpoch => Error first global epoch, "
<< Form(
"from MS index 0x%06lx, current 0x%06llx, diff %lld, raw 0x%016lx, NoErr %d, current 0x%06lx %f",
ulMsStartInEpoch, ulEpochNr, ulEpochNr - ulMsStartInEpoch, mess.getData(), fuProcEpochUntilError,
static_cast<uint64_t>(fulCurrentMsIdx / critof001::kuEpochInNs),
static_cast<size_t>(fulCurrentMsIdx / critof001::kuEpochInNs),
fulCurrentMsIdx / critof001::kuEpochInNs);
LOG(error) << fName << "::ProcessEpoch => Ignoring data until next valid epoch";
......@@ -317,9 +318,10 @@ void CbmTofUnpackAlgo::ProcessEpoch(const critof001::Message& mess, uint32_t uMe
} // else of if( ulEpochNr != ulMsStartInEpoch )
} // if( 0 < uMesgIdx )
else if (((fulCurrentEpoch + 1) % critof001::kulEpochCycleEp) != ulEpochNr) {
// Cast required to silence a warning on macos (there a uint64_t is a llu)
LOG(error) << fName << "::ProcessEpoch => Error global epoch, "
<< Form("last 0x%06llx, current 0x%06llx, diff %lld, raw 0x%016lx, NoErr %d", fulCurrentEpoch, ulEpochNr,
ulEpochNr - fulCurrentEpoch, mess.getData(), fuProcEpochUntilError);
ulEpochNr - fulCurrentEpoch, static_cast<size_t>(mess.getData()), fuProcEpochUntilError);
LOG(error) << fName << "::ProcessEpoch => Ignoring data until next valid epoch";
ulEpochNr = (fulCurrentEpoch + 1) % critof001::kulEpochCycleEp;
......@@ -337,10 +339,12 @@ void CbmTofUnpackAlgo::ProcessEpoch(const critof001::Message& mess, uint32_t uMe
fulEpochIndexInTs = ulEpochNr + critof001::kulEpochCycleEp - fulTsStartInEpoch;
}
if (10e9 < critof001::kuEpochInNs * fulEpochIndexInTs)
// Cast required to silence a warning on macos (there a uint64_t is a llu)
LOG(debug) << fName << "::ProcessEpoch => "
<< Form("Raw Epoch: 0x%06llx, Epoch offset 0x%06lx, Epoch in Ts: 0x%07lx, time %f ns (%f * %lu)",
ulEpochNr, fulTsStartInEpoch, fulEpochIndexInTs, critof001::kuEpochInNs * fulEpochIndexInTs,
critof001::kuEpochInNs, fulEpochIndexInTs);
ulEpochNr, fulTsStartInEpoch, static_cast<size_t>(fulEpochIndexInTs),
critof001::kuEpochInNs * fulEpochIndexInTs, critof001::kuEpochInNs,
static_cast<size_t>(fulEpochIndexInTs));
}
void CbmTofUnpackAlgo::ProcessHit(const critof001::Message& mess)
......
......@@ -146,7 +146,8 @@ bool CbmTrdUnpackAlgoFasp2D::unpack(const fles::Timeslice* ts, std::uint16_t ico
//Double_t fdMsSizeInNs = 1.28e6;
auto msdesc = ts->descriptor(icomp, imslice);
if (VERBOSE) printf("time start %lu\n", msdesc.idx);
// Cast required to silence a warning on macos (there a uint64_t is a llu)
if (VERBOSE) printf("time start %lu\n", static_cast<size_t>(msdesc.idx));
// define time wrt start of time slice in TRD/FASP clks [80 MHz]
fTime[0] = ULong64_t((msdesc.idx - fTsStartTime) / 12.5);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment