From 2bfaabc1c69b9d09612e334477388a64eff89d1b Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Fri, 19 Jan 2024 11:45:49 +0100 Subject: [PATCH] Fix warnings which are ignored by bot --- Alignment/CocoaFit/src/Fit.cc | 6 ++++-- Alignment/CocoaToDDL/src/UnitConverter.cc | 5 ++--- Alignment/CocoaUtilities/src/ALIFileIn.cc | 5 ++--- Alignment/CocoaUtilities/src/ALIFileOut.cc | 2 +- .../SiStripQuality/plugins/SiStripBadModuleByHandBuilder.cc | 1 - DQM/HcalTasks/plugins/UMNioTask.cc | 2 +- 6 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Alignment/CocoaFit/src/Fit.cc b/Alignment/CocoaFit/src/Fit.cc index 195d9bdc809bf..880cb9b1144dd 100644 --- a/Alignment/CocoaFit/src/Fit.cc +++ b/Alignment/CocoaFit/src/Fit.cc @@ -1210,8 +1210,9 @@ void Fit::dumpFittedValues(ALIFileOut& fileout, ALIbool printErrors, ALIbool pri // const Entry* entry; int ii, siz; std::vector::const_iterator vocite; + ALIstring sys = ALIstring("system"); for (vocite = Model::OptOList().begin(); vocite != Model::OptOList().end(); ++vocite) { - if ((*vocite)->type() == ALIstring("system")) + if ((*vocite)->type() == sys) continue; fileout << " %%%% Optical Object: " << (*vocite)->longName() << std::endl; @@ -1268,8 +1269,9 @@ void Fit::dumpFittedValuesInAllAncestorFrames(ALIFileOut& fileout, ALIbool print //---------- Iterate over OptO list std::vector entries; std::vector::const_iterator vocite; + ALIstring sys = ALIstring("system"); for (vocite = Model::OptOList().begin(); vocite != Model::OptOList().end(); ++vocite) { - if ((*vocite)->type() == ALIstring("system")) + if ((*vocite)->type() == sys) continue; fileout << " %%%% Optical Object: " << (*vocite)->longName() << std::endl; diff --git a/Alignment/CocoaToDDL/src/UnitConverter.cc b/Alignment/CocoaToDDL/src/UnitConverter.cc index c92ca008101c4..b40233f29ed8c 100644 --- a/Alignment/CocoaToDDL/src/UnitConverter.cc +++ b/Alignment/CocoaToDDL/src/UnitConverter.cc @@ -2,7 +2,6 @@ #include "Alignment/CocoaToDDL/interface/CocoaUnitsTable.h" #include "CLHEP/Units/GlobalSystemOfUnits.h" #include -#include /* UnitConverter::UnitConverter(const G4BestUnit & bu) @@ -23,7 +22,7 @@ UnitConverter::UnitConverter(ALIdouble val, const ALIstring& category) UnitConverter::~UnitConverter() { delete bu_; } std::string UnitConverter::ucstring() { - std::ostrstream str; + std::ostringstream str; if (angl_) { str.precision(11); @@ -42,7 +41,7 @@ std::string UnitConverter::ucstring() { /* ostream & operator<<(ostream & os, const UnitConverter & uc) { - ostrstream temp; + std::ostringstream temp; //temp << uc.bu_; //temp << '\0'; //string s(temp.str()); diff --git a/Alignment/CocoaUtilities/src/ALIFileIn.cc b/Alignment/CocoaUtilities/src/ALIFileIn.cc index b8395701c099e..de453718274cb 100644 --- a/Alignment/CocoaUtilities/src/ALIFileIn.cc +++ b/Alignment/CocoaUtilities/src/ALIFileIn.cc @@ -9,8 +9,7 @@ #include "Alignment/CocoaUtilities/interface/ALIFileIn.h" #include -#include -//#include +#include //#include @@ -112,7 +111,7 @@ ALIint ALIFileIn::getWordsInLine(std::vector& wordlist) { } //---------- Convert line read to istrstream to split it in words - std::istrstream istr_line(ltemp); + std::istringstream istr_line(ltemp); //--------- count how many words are there in ltemp (this sohuld not be needed, but sun compiler has problems) !! this has to be nvestigated... ALIint NoWords = 0; diff --git a/Alignment/CocoaUtilities/src/ALIFileOut.cc b/Alignment/CocoaUtilities/src/ALIFileOut.cc index 1f4653696f3e2..b6aecea980270 100644 --- a/Alignment/CocoaUtilities/src/ALIFileOut.cc +++ b/Alignment/CocoaUtilities/src/ALIFileOut.cc @@ -8,7 +8,7 @@ #include "Alignment/CocoaUtilities/interface/ALIFileOut.h" #include -#include +#include std::vector ALIFileOut::theInstances; diff --git a/CalibTracker/SiStripQuality/plugins/SiStripBadModuleByHandBuilder.cc b/CalibTracker/SiStripQuality/plugins/SiStripBadModuleByHandBuilder.cc index f01d0f3486712..2b57e88602c03 100644 --- a/CalibTracker/SiStripQuality/plugins/SiStripBadModuleByHandBuilder.cc +++ b/CalibTracker/SiStripQuality/plugins/SiStripBadModuleByHandBuilder.cc @@ -10,7 +10,6 @@ #include #include #include -#include class SiStripBadModuleByHandBuilder : public ConditionDBWriter { public: diff --git a/DQM/HcalTasks/plugins/UMNioTask.cc b/DQM/HcalTasks/plugins/UMNioTask.cc index 0d2273a356c14..6146cdd2a56d9 100644 --- a/DQM/HcalTasks/plugins/UMNioTask.cc +++ b/DQM/HcalTasks/plugins/UMNioTask.cc @@ -60,7 +60,7 @@ UMNioTask::UMNioTask(edm::ParameterSet const& ps) } int UMNioTask::getOrbitGapIndex(uint8_t eventType, uint32_t laserType) { - constants::OrbitGapType orbitGapType; + constants::OrbitGapType orbitGapType = tNull; if (eventType == constants::EVENTTYPE_PHYSICS) { orbitGapType = tPhysics; } else if (eventType == constants::EVENTTYPE_PEDESTAL) {