Skip to content

Commit 47ce03f

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 47ce03f

6 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎PWGLF/TableProducer/Common/zdcvector.cxx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -449,10 +449,10 @@ struct zdcvector {
449449
}
450450

451451
if (sumA <= 1e-4 || sumC <= 1e-4) {
452-
qxZDCA = 0.0;
453-
qxZDCC = 0.0;
454-
qyZDCA = 0.0;
455-
qyZDCC = 0.0;
452+
// qxZDCA = 0.0; // FIXME: unused
453+
// qxZDCC = 0.0; // FIXME: unused
454+
// qyZDCA = 0.0; // FIXME: unused
455+
// qyZDCC = 0.0; // FIXME: unused
456456
triggerevent = false;
457457
// zdccaltable(triggerevent, currentRunNumber, centrality, vx, vy, vz, 0.0, 0.0, 0.0, 0.0);
458458
fillTables(triggerevent, 0.f, 0.f, 0.f, 0.f);

‎PWGLF/TableProducer/Nuspex/pidTOFGeneric.cxx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ struct pidTOFGeneric {
246246
// Reset the event time
247247
eventTime = 0.f;
248248
sumOfWeights = 0.f;
249-
weight = 0.f;
249+
// weight = 0.f; // FIXME: unused
250250
// Remove the bias on TOF ev. time
251251
if constexpr (kRemoveTOFEvTimeBias) {
252252
evTimeMakerTOF.removeBias<Run3TrksWtof::iterator, filterForTOFEventTime>(trk, nGoodTracksForTOF, t0TOF[0], t0TOF[1], 2);

‎PWGLF/Tasks/Nuspex/NucleiEfficiencyTask.cxx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ struct NucleiEfficiencyTask {
333333
pdgbin = 13;
334334
break;
335335
default:
336-
pdgbin = -10;
336+
// pdgbin = -10; // FIXME: unused
337337
continue;
338338
break;
339339
}
@@ -453,7 +453,7 @@ struct NucleiEfficiencyTask {
453453
pdgbin = 13;
454454
break;
455455
default:
456-
pdgbin = -10;
456+
// pdgbin = -10; // FIXME: unused
457457
continue;
458458
break;
459459
}
@@ -539,7 +539,7 @@ struct NucleiEfficiencyTask {
539539
pdgbin = 13;
540540
break;
541541
default:
542-
pdgbin = -10;
542+
// pdgbin = -10; // FIXME: unused
543543
continue;
544544
break;
545545
}

‎PWGLF/Tasks/Nuspex/QAHistTask.cxx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ struct QAHistTask {
737737
lorentzVector_particle_MC.SetPtEtaPhiM(track.pt() * 2.0, track.eta(), track.phi(), constants::physics::MassAlpha);
738738
break;
739739
default:
740-
pdgbin = -10;
740+
// pdgbin = -10; // FIXME: unused
741741
continue;
742742
break;
743743
}

‎PWGLF/Tasks/Strangeness/cascpolsp.cxx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ struct cascpolsp {
423423
}
424424

425425
int taga = LambdaTag;
426-
int tagb = aLambdaTag;
426+
int tagb{}; // = aLambdaTag; // FIXME: unused
427427

428428
if (LambdaTag) {
429429
Lambda = Proton + AntiPion;

‎PWGLF/Tasks/Strangeness/lambdapolsp.cxx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,7 +1851,7 @@ struct lambdapolsp {
18511851
continue;
18521852

18531853
int taga = LambdaTag;
1854-
int tagb = aLambdaTag;
1854+
int tagb{}; // = aLambdaTag; // FIXME: unused
18551855

18561856
if (useAccCorr) {
18571857
accprofileL = ccdb->getForTimeStamp<TProfile2D>(ConfAccPathL.value, bc.timestamp());
@@ -2220,7 +2220,7 @@ struct lambdapolsp {
22202220
}
22212221

22222222
int taga = LambdaTag;
2223-
int tagb = aLambdaTag;
2223+
int tagb{}; // = aLambdaTag; // FIXME: unused
22242224
int tagc = K0sTag;
22252225

22262226
if (analyzeK0s && K0sTag) {

0 commit comments

Comments
 (0)