Skip to content

Commit bcd90ac

Browse files
authored
Merge pull request #47683 from iarspider/iarspider-patches-20250325-2
[L1] Fix dead assignments reported by LLVM-analyzer
2 parents 41fb4ba + 70e6431 commit bcd90ac

File tree

9 files changed

+8
-29
lines changed

9 files changed

+8
-29
lines changed

EventFilter/L1GlobalTriggerRawToDigi/src/L1GTDigiToRaw.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -656,10 +656,9 @@ unsigned L1GTDigiToRaw::packGMT(L1MuGMTReadoutRecord const& gmtrr, unsigned char
656656

657657
std::vector<L1MuRegionalCand> vrc;
658658
std::vector<L1MuRegionalCand>::const_iterator irc;
659-
unsigned* pp = p;
660659

661660
vrc = gmtrr.getDTBXCands();
662-
pp = p;
661+
unsigned* pp = p;
663662
for (irc = vrc.begin(); irc != vrc.end(); irc++) {
664663
*pp++ = (*irc).getDataWord();
665664
}

EventFilter/L1TXRawToDigi/plugins/L1TTwinMuxRawToDigi.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ void L1TTwinMuxRawToDigi::processFed(int twinMuxFed,
297297

298298
///--> Trailer - line 2 [must start with 0xA]
299299

300-
lineFED = readline(lineFED, nline, dataWord);
300+
readline(lineFED, nline, dataWord);
301301
dt_crc::calcCRC(dataWord & 0xFFFFFFFF0000FFFF, newCRC);
302302

303303
///--> AMC trailer - line 2

L1Trigger/CSCTrackFinder/src/CSCTFPtLUT.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,6 @@ ptdat CSCTFPtLUT::calcPt(const ptadd& address) const {
409409

410410
// First remake the 12-bit dPhi word from the core
411411
remerged = (address.delta_phi_12 | (address.delta_phi_23 << 8));
412-
// Now get 8-bit dPhi12
413-
absPhi12 = ((1 << 8) - 1) & remerged;
414412
// Now get 3-bit dEta
415413
dEta = ((1 << 3) - 1) & (remerged >> 8);
416414
// New get CLCT bit. CLCT = true if CLCTPattern = 8, 9, or 10, else 0.

L1Trigger/DTBti/src/DTBtiCard.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,6 @@ DTBtiChip* DTBtiCard::activeGetBTI(int sl, int n) {
386386
std::cout << " not in range [1," << geom()->nCell(sl) << "]";
387387
std::cout << " dummy BTI returned!" << std::endl;
388388
}
389-
sl = 1;
390-
n = 999;
391389
return bti;
392390
}
393391

@@ -409,8 +407,6 @@ DTBtiChip* DTBtiCard::activeGetBTI(int sl, int n) {
409407
std::cout << " invalid superlayer number: " << sl;
410408
std::cout << " dummy BTI returned!" << std::endl;
411409
}
412-
sl = 1;
413-
n = 999;
414410
return bti;
415411
}
416412

L1Trigger/DTBti/src/DTBtiChipEquations.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,6 @@ void DTBtiChip::computeEqs() {
160160
//patt 0 always uses Xbc, because Xad could be negative...
161161
//when wire B is missing, TshiftB=0
162162
//when hit B is gone out of shift register, Tshift=K0+1
163-
float _difs_p0 = _difs[5];
164-
165163
float TshiftB = 0;
166164
float TshiftC = 0;
167165
if (_thisStepUsedHit[3 - 1] == nullptr) {
@@ -180,7 +178,7 @@ void DTBtiChip::computeEqs() {
180178
} else
181179
TshiftC = _thisStepUsedHit[2 - 1]->jtrig();
182180

183-
_difs_p0 = (float)(TshiftB - TshiftC);
181+
float _difs_p0 = (float)(TshiftB - TshiftC);
184182

185183
// Zotto's
186184
_XeqAB_patt0 = (_sums[1] - K0) / 4.; //eq. AB

L1Trigger/GlobalTrigger/src/L1GlobalTriggerPSB.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,12 +1157,6 @@ void L1GlobalTriggerPSB::fillPsbBlock(edm::Event &iEvent,
11571157
}
11581158
}
11591159
}
1160-
} else {
1161-
iHf = nHfRingEtSums % hfPerWord;
1162-
// LogTrace("L1GlobalTrigger")
1163-
// << "\n No HfRingEtSums collection - skip "
1164-
// << iHf*hfBits << " bits "
1165-
// << std::endl;
11661160
}
11671161

11681162
psbWordValue.setAData(aDataVal, iAB + iPair);

L1Trigger/GlobalTrigger/src/L1GtCorrelationCondition.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,6 @@ const bool L1GtCorrelationCondition::evaluateCondition() const {
723723
<< std::endl;
724724
}
725725

726-
reqEtaPhiResult = false;
727726
continue;
728727

729728
} else {

L1Trigger/HardwareValidation/src/L1Comparator.cc

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -436,11 +436,6 @@ void L1Comparator::produce(edm::StreamID, edm::Event& iEvent, const edm::EventSe
436436
edm::Handle<L1MuGMTCandCollection> gmt_emul;
437437
edm::Handle<L1MuGMTReadoutCollection> gmt_rdt_data_;
438438
edm::Handle<L1MuGMTReadoutCollection> gmt_rdt_emul_;
439-
L1MuRegionalCandCollection const* gmt_rdt_data = nullptr;
440-
L1MuRegionalCandCollection const* gmt_rdt_emul = nullptr;
441-
//tbd: may compare extended candidates
442-
L1MuGMTCandCollection const* gmt_can_data(new L1MuGMTCandCollection);
443-
L1MuGMTCandCollection const* gmt_can_emul(new L1MuGMTCandCollection);
444439
if (runDoSys[GMT]) {
445440
iEvent.getByToken(tokenMuGMTCand_[0], gmt_data);
446441
iEvent.getByToken(tokenMuGMTCand_[1], gmt_emul);
@@ -512,10 +507,10 @@ void L1Comparator::produce(edm::StreamID, edm::Event& iEvent, const edm::EventSe
512507
gmt_rdt_emul_vec.insert(gmt_rdt_emul_vec.end(), rmc.begin(), rmc.end());
513508
}
514509
}
515-
gmt_rdt_data = &gmt_rdt_data_vec;
516-
gmt_rdt_emul = &gmt_rdt_emul_vec;
517-
gmt_can_data = &gmt_can_data_vec;
518-
gmt_can_emul = &gmt_can_emul_vec;
510+
L1MuRegionalCandCollection const* gmt_rdt_data = &gmt_rdt_data_vec;
511+
L1MuRegionalCandCollection const* gmt_rdt_emul = &gmt_rdt_emul_vec;
512+
L1MuGMTCandCollection const* gmt_can_data = &gmt_can_data_vec;
513+
L1MuGMTCandCollection const* gmt_can_emul = &gmt_can_emul_vec;
519514

520515
///--- done getting collections. ---
521516

L1Trigger/L1CaloTrigger/plugins/L1NNCaloTauEmulator.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ void L1NNCaloTauEmulator::produce(edm::Event& iEvent, const edm::EventSetup& eSe
531531

532532
float idScore = -1.;
533533
if (!VsPuId.method().empty()) {
534-
idScore = VsPuId.passID(*cl3dIt, cluster);
534+
VsPuId.passID(*cl3dIt, cluster);
535535
idScore = cluster.egVsPUMVAOut();
536536
}
537537

0 commit comments

Comments
 (0)