Project

General

Profile

Actions

Development #1385

closed

Development #1353: Code cleanup for OCT19

Code cleanup: beamtime/tof/tdc/vftx/TTofVftxUnpacker.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:
0.50 h
Spent time:

Description

Compiler warnings:

/Users/vfriese/Cbmroot/OCT19/source/beamtime/tof/tdc/vftx/TTofVftxUnpacker.cxx:121:12: warning: variable 'uFifoNbData' is used uninitialized whenever 'for' loop exits because
      its condition is false [-Wsometimes-uninitialized]
      else LOG(warn)<<"Vftx #"<<fParUnpack->GetActiveToAllTypeInd(iTdcIndex, tofMbs::vftx)<<" fifo header missing... ";
           ^~~~~~~~~
/Users/vfriese/Software/fairsoft/jun19p1/include/fairlogger/Logger.h:382:51: note: expanded from macro 'LOG'
    for (bool fairLOggerunLikelyvariable = false; fair::Logger::Logging(fair::Severity::severity) && !fairLOggerunLikelyvariable; fairLOggerunLikelyvariable = true) \
                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/vfriese/Cbmroot/OCT19/source/beamtime/tof/tdc/vftx/TTofVftxUnpacker.cxx:123:22: note: uninitialized use occurs here
   if (uMbsNbData != uFifoNbData)
                     ^~~~~~~~~~~
/Users/vfriese/Cbmroot/OCT19/source/beamtime/tof/tdc/vftx/TTofVftxUnpacker.cxx:121:12: note: remove the condition if it is always true
      else LOG(warn)<<"Vftx #"<<fParUnpack->GetActiveToAllTypeInd(iTdcIndex, tofMbs::vftx)<<" fifo header missing... ";
           ^
/Users/vfriese/Software/fairsoft/jun19p1/include/fairlogger/Logger.h:382:51: note: expanded from macro 'LOG'
    for (bool fairLOggerunLikelyvariable = false; fair::Logger::Logging(fair::Severity::severity) && !fairLOggerunLikelyvariable; fairLOggerunLikelyvariable = true) \
                                                  ^
/Users/vfriese/Cbmroot/OCT19/source/beamtime/tof/tdc/vftx/TTofVftxUnpacker.cxx:121:12: warning: variable 'uFifoNbData' is used uninitialized whenever '&&' condition is false
      [-Wsometimes-uninitialized]
      else LOG(warn)<<"Vftx #"<<fParUnpack->GetActiveToAllTypeInd(iTdcIndex, tofMbs::vftx)<<" fifo header missing... ";
           ^~~~~~~~~
/Users/vfriese/Software/fairsoft/jun19p1/include/fairlogger/Logger.h:382:51: note: expanded from macro 'LOG'
    for (bool fairLOggerunLikelyvariable = false; fair::Logger::Logging(fair::Severity::severity) && !fairLOggerunLikelyvariable; fairLOggerunLikelyvariable = true) \
                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/vfriese/Cbmroot/OCT19/source/beamtime/tof/tdc/vftx/TTofVftxUnpacker.cxx:123:22: note: uninitialized use occurs here
   if (uMbsNbData != uFifoNbData)
                     ^~~~~~~~~~~
/Users/vfriese/Cbmroot/OCT19/source/beamtime/tof/tdc/vftx/TTofVftxUnpacker.cxx:121:12: note: remove the '&&' if its condition is always true
      else LOG(warn)<<"Vftx #"<<fParUnpack->GetActiveToAllTypeInd(iTdcIndex, tofMbs::vftx)<<" fifo header missing... ";
           ^
/Users/vfriese/Software/fairsoft/jun19p1/include/fairlogger/Logger.h:382:51: note: expanded from macro 'LOG'
    for (bool fairLOggerunLikelyvariable = false; fair::Logger::Logging(fair::Severity::severity) && !fairLOggerunLikelyvariable; fairLOggerunLikelyvariable = true) \
                                                  ^
/Users/vfriese/Cbmroot/OCT19/source/beamtime/tof/tdc/vftx/TTofVftxUnpacker.cxx:113:22: note: initialize the variable 'uFifoNbData' to silence this warning
   UInt_t uFifoNbData;
                     ^
                      = 0

Please fix.

Actions #1

Updated by Volker Friese almost 3 years ago

  • Subject changed from Code cleanup: source/beamtime/tof/tdc/vftx/TTofVftxUnpacker.cxx to Code cleanup: beamtime/tof/tdc/vftx/TTofVftxUnpacker.cxx
Actions #2

Updated by Florian Uhlig almost 3 years ago

  • Assignee changed from Christian Simon to Volker Friese
  • % Done changed from 0 to 50
Actions #3

Updated by Volker Friese almost 3 years ago

  • Status changed from Assigned to In Progress
  • % Done changed from 50 to 80
Actions #4

Updated by Volker Friese almost 3 years ago

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

Warnings are fixed.

Actions

Also available in: Atom PDF