Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lot's of warning from signed versus unsigned integer comparisons #94

Open
twongjirad opened this issue Oct 5, 2017 · 2 comments
Open
Assignees

Comments

@twongjirad
Copy link
Member

twongjirad commented Oct 5, 2017

Compiling Reco3D produces a lot of warnings like below. Note super urgent, but please fix these. Either by changing iterator to size_t or casting output of x.size() with (int)x.size(). This will help make compilation debugging easier.

ReadRuiFile.cxx: In member function ‘virtual bool larcv::ReadRuiFile::process(larcv::IOManager&)’:
ReadRuiFile.cxx:101:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int iMC = 0;iMC<mc_roi_v.size();iMC++){
~~~^~~~~~~~~~~~~~~~
ReadRuiFile.cxx:124:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int iProton = 0;iProton<ProtonVertices.size();iProton++){
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
ReadRuiFile.cxx:128:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int iMuon = 0;iMuon<MuonVertices.size();iMuon++){
~~~~~^~~~~~~~~~~~~~~~~~~~
ReadRuiFile.cxx:131:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int iElectron = 0;iElectron<ElectronVertices.size();iElectron++){
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
ReadRuiFile.cxx:139:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int imu = 0;imu<goodMuon.size();imu++){
~~~^~~~~~~~~~~~~~~~
ReadRuiFile.cxx:144:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int ie = 0;ie<goodElectron.size();ie++){
~~^~~~~~~~~~~~~~~~~~~~
ReadRuiFile.cxx:187:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int iPoint = 0;iPoint<EndPoints.size();iPoint++){
~~~~~~^~~~~~~~~~~~~~~~~
ReadRuiFile.cxx: In member function ‘bool larcv::ReadRuiFile::IsGoodVertex(int, int, int, int, int)’:
ReadRuiFile.cxx:204:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int ivertex = 0;ivertex<_vertexInfo.size();ivertex++){

@hourlier
Copy link
Contributor

hourlier commented Oct 5, 2017

Taritree, I didn't see these warning pop out when I compiled...
I changed anyway, could you give it a try now? to see if it's better with your compiler?

@drinkingkazu
Copy link

drinkingkazu commented Oct 5, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants