From 18c4d00927f7e6d7eac223dee04a0dd30a82600f Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Sat, 10 Aug 2024 19:03:05 +0200 Subject: [PATCH 1/2] Don't throw a pedantic warning because of #warning --- .../include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp b/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp index 93157c7..dbdd9aa 100644 --- a/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp +++ b/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp @@ -342,7 +342,10 @@ std::unique_ptr convertTPCHits(const edm4hep::RawTimeSeri if (edm_tpchit.isAvailable()) { auto* lcio_tpchit = new lcio::TPCHitImpl(); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wpedantic" #warning "unsigned long long conversion to int" +#pragma GCC diagnostic pop lcio_tpchit->setCellID(edm_tpchit.getCellID()); lcio_tpchit->setTime(edm_tpchit.getTime()); lcio_tpchit->setCharge(edm_tpchit.getCharge()); From 2951dfbed55c179c8f56456641ec4bced7a102ef Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Sat, 10 Aug 2024 19:19:35 +0200 Subject: [PATCH 2/2] Change to #pragma message --- .../include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp b/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp index dbdd9aa..ed8fe4c 100644 --- a/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp +++ b/k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.ipp @@ -342,10 +342,8 @@ std::unique_ptr convertTPCHits(const edm4hep::RawTimeSeri if (edm_tpchit.isAvailable()) { auto* lcio_tpchit = new lcio::TPCHitImpl(); -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wpedantic" -#warning "unsigned long long conversion to int" -#pragma GCC diagnostic pop +#pragma message "unsigned long long conversion to int" + lcio_tpchit->setCellID(edm_tpchit.getCellID()); lcio_tpchit->setTime(edm_tpchit.getTime()); lcio_tpchit->setCharge(edm_tpchit.getCharge());