diff --git a/external/ipc/CMakeLists.txt b/external/ipc/CMakeLists.txt index 645fb9fb1576c5a7a0c928630ba7de6784fef24e..4ba4e516cc971627d054667018d368fb3e75b382 100644 --- a/external/ipc/CMakeLists.txt +++ b/external/ipc/CMakeLists.txt @@ -65,7 +65,7 @@ ipc/lib/fles_ipc/TimesliceMultiSubscriber.cpp ) -Set_Source_Files_Properties(${SRCS} COMPILE_FLAGS "-std=c++11 -O3 -ggdb -msse4.2 -Wall -Wpedantic -Wextra -Winit-self -Wundef -Wold-style-cast -Woverloaded-virtual -Wwrite-strings -Wnon-virtual-dtor -fno-omit-frame-pointer") +Set_Source_Files_Properties(${SRCS} COMPILE_FLAGS "-std=c++${CMAKE_CXX_STANDARD} -O3 -ggdb -msse4.2 -Wall -Wpedantic -Wextra -Winit-self -Wundef -Wold-style-cast -Woverloaded-virtual -Wwrite-strings -Wnon-virtual-dtor -fno-omit-frame-pointer") Set(LIBRARY_NAME fles_ipc) If(UNIX AND NOT APPLE) diff --git a/fles/mcbm2018/unpacker/CbmMcbm2018UnpackerAlgoPsd.cxx b/fles/mcbm2018/unpacker/CbmMcbm2018UnpackerAlgoPsd.cxx index 7c41ec29bcda0658cfbf3ceb3fe6ff6490a72b18..c1cc589ad5c70d030d509cbf201977276c85e522 100644 --- a/fles/mcbm2018/unpacker/CbmMcbm2018UnpackerAlgoPsd.cxx +++ b/fles/mcbm2018/unpacker/CbmMcbm2018UnpackerAlgoPsd.cxx @@ -290,12 +290,12 @@ Bool_t CbmMcbm2018UnpackerAlgoPsd::ProcessMs(const fles::Timeslice& ts, size_t u if ((fair::Logger::Logging(fair::Severity::debug)) && (uNbMessages > 1)) { printf("%u = %u 64bit messages\n", uSize, uNbMessages); for (uint32_t line_iter = 0; line_iter < uNbMessages - 2; line_iter += 2) { - printf("%010lx", (pInBuff[line_iter] & 0xffffffffff)); - printf("%010lx", (pInBuff[line_iter + 1] & 0xffffffffff)); + printf("%010llx", static_cast<unsigned long long int>(pInBuff[line_iter] & 0xffffffffff)); + printf("%010llx", static_cast<unsigned long long int>(pInBuff[line_iter + 1] & 0xffffffffff)); printf(" %u - %u", line_iter + 1, line_iter + 2); printf("\n"); } - printf("%020lx %u\n", pInBuff[uNbMessages - 1], uNbMessages); + printf("%020llx %u\n", static_cast<unsigned long long int>(pInBuff[uNbMessages - 1]), uNbMessages); } // every 80bit gbt word is decomposed into two 64bit words diff --git a/fles/mcbm2018/unpacker/CbmMcbm2018UnpackerAlgoRich.cxx b/fles/mcbm2018/unpacker/CbmMcbm2018UnpackerAlgoRich.cxx index b69e227e52647fce6668fe305f5ae33b96affd84..4c21a869dd0b21c3070cd9d918a11a1b66bc4f7e 100644 --- a/fles/mcbm2018/unpacker/CbmMcbm2018UnpackerAlgoRich.cxx +++ b/fles/mcbm2018/unpacker/CbmMcbm2018UnpackerAlgoRich.cxx @@ -653,7 +653,7 @@ Bool_t CbmMcbm2018UnpackerAlgoRich::DebugMs(const fles::Timeslice& ts, size_t uM return kTRUE; } -Int_t CbmMcbm2018UnpackerAlgoRich::Debug(const uint8_t* ptr, const size_t size) { return 0; } +Int_t CbmMcbm2018UnpackerAlgoRich::Debug(const uint8_t* /*ptr*/, const size_t /*size*/) { return 0; } void CbmMcbm2018UnpackerAlgoRich::ErrorMsg(uint16_t errbits, CbmMcbm2018RichErrorType type, uint16_t tdcId) diff --git a/reco/detectors/tof/unpack/CbmTofUnpackAlgo.cxx b/reco/detectors/tof/unpack/CbmTofUnpackAlgo.cxx index 7014a1990f2183d945dbe7b7feef728792eb6597..4fd565ed3f51e217f8ca8894c9611ea240bac486 100644 --- a/reco/detectors/tof/unpack/CbmTofUnpackAlgo.cxx +++ b/reco/detectors/tof/unpack/CbmTofUnpackAlgo.cxx @@ -204,7 +204,7 @@ bool CbmTofUnpackAlgo::unpack(const fles::Timeslice* ts, std::uint16_t icomp, UI LOG(warning) << fName << "::unpack => " << "In timeslice " << fulCurrentTsIdx << " in microslice " << imslice << " component " << icomp << " last message is not an EndOfMs: type " << messageType - << Form(" dump: 0x%16lX", pMess[uIdx].getData()); + << Form(" dump: 0x%16llX", static_cast<unsigned long long int>(pMess[uIdx].getData())); } // else of if( pMess[uIdx].isEndOfMs() ) } // if( uNbMessages - 1 == uIdx ) /* @@ -226,7 +226,7 @@ bool CbmTofUnpackAlgo::unpack(const fles::Timeslice* ts, std::uint16_t icomp, UI LOG(warning) << fName << "::unpack => " << "In timeslice " << fulCurrentTsIdx << " in microslice " << imslice << " component " << icomp << " first message is not an epoch: type " << messageType - << Form(" dump: 0x%16lX", pMess[uIdx].getData()); + << Form(" dump: 0x%16llX", static_cast<unsigned long long int>(pMess[uIdx].getData())); LOG(warning) << fName << "::unpack => " << "Ignoring this microslice."; return false; @@ -300,12 +300,13 @@ 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<size_t>(fulCurrentMsIdx / critof001::kuEpochInNs), - fulCurrentMsIdx / critof001::kuEpochInNs); + LOG(error) + << fName << "::ProcessEpoch => Error first global epoch, " + << Form("from MS index 0x%06llx, current 0x%06llx, diff %lld, raw 0x%016llx, NoErr %d, current 0x%06lx %f", + static_cast<unsigned long long int>(ulMsStartInEpoch), ulEpochNr, ulEpochNr - ulMsStartInEpoch, + static_cast<unsigned long long int>(mess.getData()), fuProcEpochUntilError, + static_cast<size_t>(fulCurrentMsIdx / critof001::kuEpochInNs), + fulCurrentMsIdx / critof001::kuEpochInNs); LOG(error) << fName << "::ProcessEpoch => Ignoring data until next valid epoch"; fbLastEpochGood = false; @@ -341,10 +342,10 @@ void CbmTofUnpackAlgo::ProcessEpoch(const critof001::Message& mess, uint32_t uMe 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, static_cast<size_t>(fulEpochIndexInTs), - critof001::kuEpochInNs * fulEpochIndexInTs, critof001::kuEpochInNs, - static_cast<size_t>(fulEpochIndexInTs)); + << Form("Raw Epoch: 0x%06llx, Epoch offset 0x%06llx, Epoch in Ts: 0x%07lx, time %f ns (%f * %lu)", + ulEpochNr, static_cast<long long unsigned int>(fulTsStartInEpoch), + static_cast<size_t>(fulEpochIndexInTs), critof001::kuEpochInNs * fulEpochIndexInTs, + critof001::kuEpochInNs, static_cast<size_t>(fulEpochIndexInTs)); } void CbmTofUnpackAlgo::ProcessHit(const critof001::Message& mess)