Project

General

Profile

Actions

Development #1374

closed

Development #1353: Code cleanup for OCT19

Code cleanup: trd/sim/CbmTrdModuleSimT.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:


/home/uhlig/cbm/release/oct19/trd/sim/CbmTrdModuleSimT.cxx: In member function 'virtual Int_t CbmTrdModuleSimT::FlushBuffer(ULong64_t)':
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/sim/CbmTrdModuleSimT.cxx:536:58: warning: variable 'chFasp' set but not used [-Wunused-but-set-variable]
   CbmTrdParFasp *fasp(NULL); const CbmTrdParFaspChannel *chFasp[2]={NULL};
                                                          ^
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/sim/CbmTrdModuleSimT.cxx:539:9: warning: variable 'address' set but not used [-Wunused-but-set-variable]
   Int_t address(0), localAddress(0), ndigi(0)/*, n2(0)*/;
         ^

Please fix.

Actions #1

Updated by Volker Friese almost 3 years ago

  • Status changed from Assigned to In Progress
  • Assignee changed from Alexandru Bercuci to Florian Uhlig

The warnings remains after commit 15030, which I do not understand. Now the compiler (gcc omly) complains that the variable fasp (defined and set in line 536) is not used;

/home/uhlig/cbm/release/oct19/trd/sim/CbmTrdModuleSimT.cxx: In member function 'virtual Int_t CbmTrdModuleSimT::FlushBuffer(ULong64_t)':
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/sim/CbmTrdModuleSimT.cxx:536:18: warning: variable 'fasp' set but not used [-Wunused-but-set-variable]
   CbmTrdParFasp *fasp(NULL); //const CbmTrdParFaspChannel *chFasp[2]={NULL};

But it is clearly used in line 557. Florian, do you have some idea?

Actions #2

Updated by Volker Friese almost 3 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 90

Presumably fixed in r15046.

Actions #3

Updated by Volker Friese almost 3 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 90 to 100

Warning is fixed.

Actions

Also available in: Atom PDF