Project

General

Profile

Actions

Development #1367

closed

Development #1353: Code cleanup for OCT19

Code cleanup: trd/base/CbmTrdFasp.cxx

Added by Volker Friese almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
09/16/2019
Due date:
09/27/2019
% Done:

100%

Estimated time:
1.00 h
Spent time:

Description

Compiler warnings:


/home/uhlig/cbm/release/oct19/trd/base/CbmTrdFASP.cxx: In member function 'void CbmTrdFASP::ScanDigiNE(std::vector<std::pair<CbmTrdDigi*, CbmMatch*> >*, Int_t, Int_t)':
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/base/CbmTrdFASP.cxx:503:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(Int_t ip(0), tm(fStartTime/5); ip<fOut.size(); ip++, tm+=5) fGraphPhys[gid]->SetPoint(ip, tm, 0.);
                                              ^
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/base/CbmTrdFASP.cxx:538:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(Int_t ip(0), tm(fStartTime/5); ip<fOut.size(); ip++, tm+=5) fGraphPhys[gid]->SetPoint(ip, tm, 0.);
                                              ^
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/base/CbmTrdFASP.cxx:579:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for(Int_t ip(0), tm(fStartTime/5); ip<fOut.size(); ip++, tm+=5) fGraphPhys[gid]->SetPoint(ip, tm, 0.);
                                            ^
/home/uhlig/cbm/release/oct19/trd/base/CbmTrdFASP.cxx: In member function 'void CbmTrdFASP::WriteDigi()':
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/base/CbmTrdFASP.cxx:636:10: warning: variable 'mask' set but not used [-Wunused-but-set-variable]
   Bool_t mask(0), pileup(0);        
          ^
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/base/CbmTrdFASP.cxx:636:19: warning: variable 'pileup' set but not used [-Wunused-but-set-variable]
   Bool_t mask(0), pileup(0);        
                   ^
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/base/CbmTrdFASP.cxx:680:15: warning: 'hTime' may be used uninitialized in this function [-Wmaybe-uninitialized]
       if(hTime-time < 400){ // found converted hit
               ^

Please fix.

Actions #1

Updated by Volker Friese almost 3 years ago

One warning still remains after r15028:


/home/uhlig/cbm/NIGHTLY/trd/base/CbmTrdFASP.cxx: In member function 'void CbmTrdFASP::WriteDigi()':
[CTest: warning matched] /home/uhlig/cbm/NIGHTLY/trd/base/CbmTrdFASP.cxx:680:15: warning: 'hTime' may be used uninitialized in this function [-Wmaybe-uninitialized]
       if(hTime-time < 400){ // found converted hit

Actions #2

Updated by Volker Friese almost 3 years ago

  • Status changed from Assigned to In Progress
  • Assignee changed from Alexandru Bercuci to Volker Friese

The warning remains even after r15032, which I not understand. I tried to silence it with r15035, although I do not see why that should be necessary.

Actions #3

Updated by Volker Friese almost 3 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

OK, finally done.

Actions

Also available in: Atom PDF