Skip to content

Commit

Permalink
Solve -Wstrict-overflow warnings
Browse files Browse the repository at this point in the history
Solve -Wstrict-overflow warnings

Solve -Wstrict-overflow warnings

Solve -Wstrict-overflow warnings

Fix signed overflow warning

Apply smuzaffar suggestion

Fix style

Apply smuzaffar suggestion

Apply correction to initial suggestion
  • Loading branch information
aandvalenzuela committed Jul 14, 2022
1 parent 8bc5b43 commit 805069f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Alignment/OfflineValidation/plugins/OverlapValidation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ void OverlapValidation::analyzeTrajectory(const Trajectory& trajectory,
++overlapCounts_[1];
if ((layer != -1) && (acceptLayer[subDet])) {
for (vector<TrajectoryMeasurement>::const_iterator itmCompare = itm - 1;
itmCompare >= measurements.begin() && itmCompare > itm - 4;
(itmCompare >= measurements.begin()) && ((itmCompare + 4) > itm);
--itmCompare) {
DetId compareId = itmCompare->recHit()->geographicalId();

Expand Down
2 changes: 1 addition & 1 deletion Alignment/TrackerAlignment/plugins/TkAlCaOverlapTagger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ void TkAlCaOverlapTagger::produce(edm::Event& iEvent, const edm::EventSetup& iSe

if ((previousTM != nullptr) && (layer != -1)) {
for (std::vector<TrajectoryMeasurement>::const_iterator itmCompare = itTrajMeas - 1;
itmCompare >= tmColl.begin() && itmCompare > itTrajMeas - 4;
(itmCompare >= tmColl.begin()) && ((itmCompare + 4) > itTrajMeas);
--itmCompare) {
DetId compareId = itmCompare->recHit()->geographicalId();
if (subDet != compareId.subdetId() || layer != layerFromId(compareId, tTopo))
Expand Down
2 changes: 1 addition & 1 deletion Calibration/Tools/src/HouseholderDecomposition.cc
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ void HouseholderDecomposition::solve(std::vector<float>& y) {

for (i = Nchannels - 2; i >= 0; i--) {
z[i] = energyVectorProc[i];
for (j = i + 1; j < Nchannels; j++) {
for (j = i + 1; j - Nchannels < 0; j++) {
z[i] -= eventMatrixProc[i][j] * z[j];
}
z[i] /= alpha[i];
Expand Down

0 comments on commit 805069f

Please sign in to comment.