Skip to content

Commit eeecbb1

Browse files
committed
Fix unused variables, parameters, values
Fixes errors from the following Clang-Tidy categories: - `clang-analyzer-deadcode.DeadStores` - `clang-diagnostic-unused-parameter` - `clang-diagnostic-unused-variable` Most errors are fixed temporarily by commenting out the unused bits and by adding a `FIXME: unused` comment. The final fix is to either remove the unused bits or to fix the bugs which has to be done by someone who knows the intended behaviour.
1 parent d561ab2 commit eeecbb1

6 files changed

Lines changed: 18 additions & 17 deletions

File tree

‎PWGMM/Lumi/Tasks/lumiStability.cxx‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,11 @@ struct LumiStabilityTask {
276276
int executionCounter = 0;
277277
int nbin = o2::constants::lhc::LHCMaxBunches;
278278
uint32_t nOrbitsPerTF = 0; // 128 in 2022, 32 in 2023
279-
if (is2022Data) {
280-
nOrbitsPerTF = 128; // 128 in 2022, 32 in 2023
281-
} else {
282-
nOrbitsPerTF = 32; // 128 in 2022, 32 in 2023
283-
}
279+
// if (is2022Data) {
280+
// nOrbitsPerTF = 128; // 128 in 2022, 32 in 2023 // FIXME: unused
281+
// } else {
282+
// nOrbitsPerTF = 32; // 128 in 2022, 32 in 2023 // FIXME: unused
283+
// }
284284
int runNumber = bcs.iteratorAt(0).runNumber();
285285
if (runNumber != lastRunNumber && executionCounter < 1) {
286286
tsSOR = 0;
@@ -497,8 +497,8 @@ struct LumiStabilityTask {
497497
pastActivityFDDVertex |= (vertexPast);
498498
}
499499
}
500-
deltaIndex = 0;
501-
deltaBC = 0;
500+
// deltaIndex = 0; // FIXME: unused
501+
// deltaBC = 0; // FIXME: unused
502502

503503
if (pastActivityFDDVertex == false) {
504504
histos.fill(HIST("FDD/hCounts"), 2);
@@ -645,8 +645,8 @@ struct LumiStabilityTask {
645645
pastActivityFDDTriggerCCoincidenceC |= (triggerCPast & isCoinCPast);
646646
}
647647
}
648-
deltaIndex = 0;
649-
deltaBC = 0;
648+
// deltaIndex = 0; // FIXME: unused
649+
// deltaBC = 0; // FIXME: unused
650650

651651
if (pastActivityFDDVertexCoincidences == false) {
652652
histos.fill(HIST("FDD/hCounts"), 4);
@@ -782,8 +782,8 @@ struct LumiStabilityTask {
782782
pastActivityFT0TriggerC |= triggerCPast;
783783
}
784784
}
785-
deltaIndex = 0;
786-
deltaBC = 0;
785+
// deltaIndex = 0; // FIXME: unused
786+
// deltaBC = 0; // FIXME: unused
787787

788788
histos.fill(HIST("FT0/hCounts"), 1);
789789
if (pastActivityFT0Vertex == false) {

‎PWGMM/Lumi/macros/merger.C‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void merger()
3030
TFile* fout = new TFile("mergedOutput.root", "recreate");
3131
TTree* tin = new TTree("EventInfo_merged", "");
3232

33-
TList* list = fin->GetListOfKeys();
33+
// TList* list = fin->GetListOfKeys(); // FIXME: unused
3434
TIter next(fin->GetListOfKeys());
3535

3636
ULong64_t fTimeStamp;

‎PWGMM/Lumi/macros/non_fac.C‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ double tmax;
4545

4646
int Countig;
4747

48-
void chi2(Int_t& npar, Double_t* gin, Double_t& f, Double_t* par, Int_t flag)
48+
void chi2(Int_t& /*npar*/, Double_t* /*gin*/, Double_t& f, Double_t* par, Int_t /*flag*/)
4949
{
5050
TMatrixD sigma(2, 2);
5151
double results = 0.;
@@ -241,4 +241,5 @@ void non_fac()
241241
for (int i = 0; i < 10; i++) {
242242
hParam[i]->Write();
243243
}
244+
fout->Close();
244245
}

‎PWGMM/Mult/TableProducer/ambiguousTrackPropagation.cxx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ struct AmbiguousTrackPropagation {
292292
o2::track::TrackParCovFwd bestTrackPar;
293293

294294
for (auto const& atrack : atracks) {
295-
dcaInfo = 999; // DCAxy
295+
// dcaInfo = 999; // DCAxy // FIXME: unused
296296
bestDCA = 999;
297297

298298
auto track = atrack.mfttrack();
@@ -375,7 +375,7 @@ struct AmbiguousTrackPropagation {
375375
o2::track::TrackParCovFwd bestTrackPar;
376376

377377
for (auto const& track : tracks) {
378-
dcaInfo = 999; // DCAxy
378+
// dcaInfo = 999; // DCAxy // FIXME: unused
379379
bestDCA = 999;
380380

381381
auto bestCol = track.has_collision() ? track.collisionId() : -1;

‎PWGMM/Mult/Tasks/dndeta-hi.cxx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ struct MultiplicityCounter {
835835
auto pTrack = v0.template posTrack_as<DaughterTracks>();
836836
auto nTrack = v0.template negTrack_as<DaughterTracks>();
837837

838-
if (0 && v0.v0radius() > v0radius &&
838+
if (0 && v0.v0radius() > v0radius && // FIXME: always false
839839
v0.v0cosPA() > v0cospa &&
840840
abs(pTrack.eta()) < etadau &&
841841
abs(nTrack.eta()) < etadau) {

‎PWGMM/Mult/Tasks/vertexing-fwd.cxx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ struct vertexingfwd {
148148

149149
for (auto& atrack : atracks) {
150150

151-
dcaXY = 999; // DCAxy
151+
// dcaXY = 999; // DCAxy // FIXME: unused
152152
bestDCA = 999;
153153

154154
auto track = atrack.mfttrack_as<MFTTracksLabeled>();

0 commit comments

Comments
 (0)