Bug #18868
new warning from gcc 6.4.0 in larreco TrackFinder
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:
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
History
#1 Updated by Lynn Garren about 3 years ago
- Occurs In v06_67_00 added
- Occurs In deleted (
v06_66_00)
#2 Updated by Gianluca Petrillo about 3 years 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 about 3 years 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 about 3 years ago
The fix was pushed into develop
branch of larreco
.
#5 Updated by Gianluca Petrillo about 3 years ago
- % Done changed from 90 to 100
Remove unused variable.
This solves issue #18868.