Project

General

Profile

Bug #18868

new warning from gcc 6.4.0 in larreco TrackFinder

Added by Lynn Garren over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Reconstruction
Target version:
-
Start date:
02/01/2018
Due date:
% Done:

100%

Estimated time:
Occurs In:
Experiment:
LArSoft
Co-Assignees:
Duration:

Description

TrackFinder Track3DKalmanSPS_module.cc defines uniqueSpptIt, but does not use the variable. This is picked up as a warning and treated as an error by gcc 6.4. Since it appears that the definition has side effects, this code should be reviewed and fixed by the experts.

              art::PtrVector<recob::SpacePoint>::iterator uniqueSpptIt =
              std::set_union(spacepointssExcise.begin(),spacepointssExcise.end(),
                             spacepointssExcise.begin(),spacepointssExcise.end(),

As a workaround, "cet_add_compiler_flags(CXX -Wno-unused-but-set-variable)" has been added to TrackFinder/CMakeLists.txt

Associated revisions

Revision cd77cd54 (diff)
Added by Gianluca Petrillo over 1 year ago

Remove unused variable.

This solves issue #18868.

History

#1 Updated by Lynn Garren over 1 year ago

  • Occurs In v06_67_00 added
  • Occurs In deleted (v06_66_00)

#2 Updated by Gianluca Petrillo over 1 year ago

  • Category set to Reconstruction
  • Status changed from New to Resolved
  • % Done changed from 0 to 90

I have verified that the result of the incriminated line can be discarded with no side effects.

#3 Updated by Gianluca Petrillo over 1 year ago

Ops, I should clarify: the new code should look like:

              std::set_union(spacepointssExcise.begin(),spacepointssExcise.end(),
                             spacepointssExcise.begin(),spacepointssExcise.end(),
                             spacepointssExcise.begin()
                             );

so only the part on the first line, art::PtrVector<recob::SpacePoint>::iterator uniqueSpptIt =, is superfluous.

#4 Updated by Gianluca Petrillo over 1 year ago

The fix was pushed into develop branch of larreco.

#5 Updated by Gianluca Petrillo over 1 year ago

  • % Done changed from 90 to 100


Also available in: Atom PDF