Skip to content

Commit 766a44d

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 766a44d

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎EventFiltering/macros/checkBCRange.C‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ void checkBCRange(const char* filename, const char* rangeFileName)
131131
}
132132
}
133133

134-
TList* directoryList = inputFile.GetListOfKeys();
134+
// TList* directoryList = inputFile.GetListOfKeys(); // FIXME: unused
135135
std::vector<InteractionRecord> bcids;
136136
for (auto key : *inputFile.GetListOfKeys()) {
137137
TTree* treeDecision = dynamic_cast<TTree*>(inputFile.Get(Form("%s/O2cefpdecision", key->GetName())));

‎EventFiltering/macros/checkBCrangesSkimming.C‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ struct bcTuple {
4646
};
4747

4848
struct selectedFrames : public IRFrame {
49-
selectedFrames(ULong64_t bcAO2D, ULong64_t bcEvSel, const IRFrame& frame) : IRFrame(frame), bcAO2D(bcAO2D), bcEvSel(bcEvSel), triMask{0, 0}, selMask{0, 0} {}
50-
selectedFrames(ULong64_t bcAO2D, ULong64_t bcEvSel, ULong64_t triMask[2], ULong64_t selMask[2], const IRFrame& frame) : IRFrame(frame), bcAO2D(bcAO2D), bcEvSel(bcEvSel), triMask{triMask[0], triMask[1]}, selMask{selMask[0], selMask[1]} {}
49+
selectedFrames(ULong64_t bcAO2D, ULong64_t bcEvSel, const IRFrame& frame) : IRFrame(frame), triMask{0, 0}, selMask{0, 0}, bcAO2D(bcAO2D), bcEvSel(bcEvSel) {}
50+
selectedFrames(ULong64_t bcAO2D, ULong64_t bcEvSel, ULong64_t triMask[2], ULong64_t selMask[2], const IRFrame& frame) : IRFrame(frame), triMask{triMask[0], triMask[1]}, selMask{selMask[0], selMask[1]}, bcAO2D(bcAO2D), bcEvSel(bcEvSel) {}
5151
ULong64_t triMask[2]{0ull}, selMask[2]{0ull}, bcAO2D, bcEvSel;
5252
int numSameTriggerInNearbyBCs = 0; // related to bcDiffTolerance
5353
bool isSingle() { return numSameTriggerInNearbyBCs == 0; }
@@ -447,7 +447,7 @@ void checkBCrangesSkimming(std::string AnaFileName = "AnalysisResults.root", std
447447
}
448448

449449
// Check BC differences
450-
int npair{0}, npairedBCAO2D{0}, npairedBCEvSel{0}, ncloseskimmed{0}, maxdeltaBCAO2D{0}, maxdeltaBCEvSel{0};
450+
int npair{0}, npairedBCAO2D{0}, npairedBCEvSel{0}, ncloseskimmed{0}; //, maxdeltaBCAO2D{0}, maxdeltaBCEvSel{0}; // FIXME: unused
451451
int firstTrg = 0;
452452
for (int i = 0; i < originalFrames.size(); i++) {
453453
auto& frame = originalFrames[i];

‎EventFiltering/macros/selectivityPlot.C‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ void selectivityPlot(int runNumber = 550781, const TString& inputfile = "Analysi
7878
line->Draw();
7979
TArrow* arrow = new TArrow(mFiltered->GetXaxis()->GetXmax(), 0.0005, mFiltered->GetXaxis()->GetXmax() + 1, 0.0005, 0.01, "<|");
8080

81-
Int_t ci; // for color index setting
82-
TColor* color; // for color definition with alpha
81+
Int_t ci; // for color index setting
82+
// TColor* color; // for color definition with alpha // FIXME: unused
8383
ci = TColor::GetColor("#0000ff");
8484
arrow->SetFillColor(ci);
8585
arrow->SetFillStyle(1001);

‎EventFiltering/macros/uploadOTSobjects.C‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ void uploadOTSobjects(std::string inputList, const std::string& passName, bool u
137137
endTS = (orbitResetTimestamp + static_cast<int64_t>(bcEnd * o2::constants::lhc::LHCBunchSpacingNS * 1e-3)) / 1000 + 1;
138138
break;
139139
}
140-
bcEnd = nextHelper.bcAOD > nextHelper.bcEvSel ? nextHelper.bcAOD : nextHelper.bcEvSel;
140+
// bcEnd = nextHelper.bcAOD > nextHelper.bcEvSel ? nextHelper.bcAOD : nextHelper.bcEvSel; // FIXME: unused
141141
endIndex++;
142142
}
143143
std::cout << ">>> Chunk " << helperIndex << " - " << helperIndex + chunk.size() << " : " << startTS << " - " << endTS << " \t" << (endTS - startTS) * 1.e-3 << std::endl;

0 commit comments

Comments
 (0)