From ee73e844992d03cc05a109ba4dab2796a33b7d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= <26327373+vkucera@users.noreply.github.com> Date: Sat, 7 Nov 2026 19:00:04 +0100 Subject: [PATCH] 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. --- PWGHF/HFC/Macros/FitCorrel.C | 4 ++-- PWGHF/TableProducer/mcPidTof.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGHF/HFC/Macros/FitCorrel.C b/PWGHF/HFC/Macros/FitCorrel.C index e5b88cb5bd2..328227900ee 100644 --- a/PWGHF/HFC/Macros/FitCorrel.C +++ b/PWGHF/HFC/Macros/FitCorrel.C @@ -259,13 +259,13 @@ void fitCorrelDs(const TString& cfgFileName = "config_CorrAnalysis.json") corrFitter[iBinPtHad][iBinPtCand]->setFuncType(static_cast(fitFunc[iBinPtCand])); corrFitter[iBinPtHad][iBinPtCand]->fitting(kTRUE, kTRUE); // the first term is for drawing the fit functions, the second argument is useExternalParams - TF1* fFit = corrFitter[iBinPtHad][iBinPtCand]->getFitFunction(); + // TF1* fFit = corrFitter[iBinPtHad][iBinPtCand]->getFitFunction(); // FIXME: unused // Title of the histogram auto* pttext = new TPaveText(0.15, 0.9, 0.85, 0.95, "NDC"); pttext->SetFillStyle(0); pttext->SetBorderSize(0); - TText* tpT = pttext->AddText(0., 0.8, Form("%.0f < p_{T}^{D_{s}} < %.0f GeV/c, p_{T}^{assoc} > %.1f GeV/c", binsPtCandIntervals[iBinPtCand], binsPtCandIntervals[iBinPtCand + 1], binsPtHadIntervals[iBinPtHad])); + pttext->AddText(0., 0.8, Form("%.0f < p_{T}^{D_{s}} < %.0f GeV/c, p_{T}^{assoc} > %.1f GeV/c", binsPtCandIntervals[iBinPtCand], binsPtCandIntervals[iBinPtCand + 1], binsPtHadIntervals[iBinPtHad])); // pttext -> Draw("same"); // Fill the histograms with the fit parameters diff --git a/PWGHF/TableProducer/mcPidTof.cxx b/PWGHF/TableProducer/mcPidTof.cxx index 78dda49a10c..0462d3a35f6 100644 --- a/PWGHF/TableProducer/mcPidTof.cxx +++ b/PWGHF/TableProducer/mcPidTof.cxx @@ -604,7 +604,7 @@ struct TofEventTime { // Reset the event time eventTime = 0.f; sumOfWeights = 0.f; - weight = 0.f; + // weight = 0.f; // FIXME: unused // Remove the bias on TOF ev. time if constexpr (RemoveTofEvTimeBias) { evTimeMakerTOF.removeBias(trk, nGoodTracksForTOF, t0TOF[0], t0TOF[1], 2);