PETsys / sw_daq_tofpet2

TOFPET 2 data acquisition software
MIT License
7 stars 9 forks source link

Clang-tidy warnings #2

Closed ferdymercury closed 1 year ago

ferdymercury commented 3 years ago

Clang-tidy reports some warnings when analyzing the code, some of them are not important, but others might be memory leaks:

/tmp/sw_daq_tofpet2/src/base/CoarseSorter.cpp:57:12: warning: Value stored to 'nTotal' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'nTotal' during its initialization is never read in /tmp/sw_daq_tofpet2/src/base/CoarseSorter.cpp:57
/tmp/sw_daq_tofpet2/src/base/ProcessHit.cpp:92:12: warning: Value stored to 'p0' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'p0' during its initialization is never read in /tmp/sw_daq_tofpet2/src/base/ProcessHit.cpp:92
/tmp/sw_daq_tofpet2/src/base/SystemConfig.cpp:39:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
 1: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 in /tmp/sw_daq_tofpet2/src/base/SystemConfig.cpp:39
/tmp/sw_daq_tofpet2/src/base/SystemConfig.cpp:120:11: warning: Value stored to 'indexL' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'indexL' during its initialization is never read in /tmp/sw_daq_tofpet2/src/base/SystemConfig.cpp:120
/tmp/sw_daq_tofpet2/src/base/SystemConfig.cpp:197:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
 1: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 in /tmp/sw_daq_tofpet2/src/base/SystemConfig.cpp:197
/tmp/sw_daq_tofpet2/src/base/ThreadPool.cpp:10:1: warning: non-POD static (ThreadPool) [clazy-non-pod-global-static]
/tmp/sw_daq_tofpet2/src/daqd/Client.cpp:84:2: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
 1: Assuming the condition is false in /tmp/sw_daq_tofpet2/src/daqd/Client.cpp:29
 2: Taking false branch in /tmp/sw_daq_tofpet2/src/daqd/Client.cpp:29
 3: Assuming the condition is false in /tmp/sw_daq_tofpet2/src/daqd/Client.cpp:36
 4: Taking false branch in /tmp/sw_daq_tofpet2/src/daqd/Client.cpp:36
 5: Assuming 'nBytesNext' is <= 0 in /tmp/sw_daq_tofpet2/src/daqd/Client.cpp:40
 6: Taking false branch in /tmp/sw_daq_tofpet2/src/daqd/Client.cpp:40
 7: Assuming 'commandAcqOnOff' is not equal to field 'type' in /tmp/sw_daq_tofpet2/src/daqd/Client.cpp:49
 8: Taking false branch in /tmp/sw_daq_tofpet2/src/daqd/Client.cpp:49
 9: Assuming 'commandGetDataFrameSharedMemoryName' is not equal to field 'type' in /tmp/sw_daq_tofpet2/src/daqd/Client.cpp:51
10: Taking false branch in /tmp/sw_daq_tofpet2/src/daqd/Client.cpp:51
11: Assuming 'commandGetDataFrameWriteReadPointer' is not equal to field 'type' in /tmp/sw_daq_tofpet2/src/daqd/Client.cpp:53
12: Taking false branch in /tmp/sw_daq_tofpet2/src/daqd/Client.cpp:53
13: Assuming 'commandSetDataFrameReadPointer' is not equal to field 'type' in /tmp/sw_daq_tofpet2/src/daqd/Client.cpp:55
14: Taking false branch in /tmp/sw_daq_tofpet2/src/daqd/Client.cpp:55
15: Assuming 'commandToFrontEnd' is equal to field 'type' in /tmp/sw_daq_tofpet2/src/daqd/Client.cpp:57
16: Taking true branch in /tmp/sw_daq_tofpet2/src/daqd/Client.cpp:57
17: Calling 'Client::doCommandToFrontEnd' in /tmp/sw_daq_tofpet2/src/daqd/Client.cpp:58
18: Assigned value is garbage or undefined in /tmp/sw_daq_tofpet2/src/daqd/Client.cpp:84
/tmp/sw_daq_tofpet2/src/daqd/DAQFrameServer.cpp:219:22: warning: Value stored to 'frameSource' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'frameSource' during its initialization is never read in /tmp/sw_daq_tofpet2/src/daqd/DAQFrameServer.cpp:219
/tmp/sw_daq_tofpet2/src/daqd/DAQFrameServer.cpp:220:22: warning: Value stored to 'frameType' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'frameType' during its initialization is never read in /tmp/sw_daq_tofpet2/src/daqd/DAQFrameServer.cpp:220
/tmp/sw_daq_tofpet2/src/daqd/DAQFrameServer.cpp:222:22: warning: Value stored to 'frameID' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'frameID' during its initialization is never read in /tmp/sw_daq_tofpet2/src/daqd/DAQFrameServer.cpp:222
/tmp/sw_daq_tofpet2/src/daqd/FrameServer.cpp:186:21: warning: Value stored to 'frameID' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'frameID' during its initialization is never read in /tmp/sw_daq_tofpet2/src/daqd/FrameServer.cpp:186
/tmp/sw_daq_tofpet2/src/daqd/FrameServer.cpp:189:7: warning: Value stored to 'frameLost' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'frameLost' during its initialization is never read in /tmp/sw_daq_tofpet2/src/daqd/FrameServer.cpp:189
/tmp/sw_daq_tofpet2/src/daqd/PFP_KX7.cpp:125:2: warning: Call to virtual method 'PFP_KX7::setAcquistionOnOff' during destruction bypasses virtual dispatch [clang-analyzer-optin.cplusplus.VirtualCall]
 1: Call to virtual method 'PFP_KX7::setAcquistionOnOff' during destruction bypasses virtual dispatch in /tmp/sw_daq_tofpet2/src/daqd/PFP_KX7.cpp:125
/tmp/sw_daq_tofpet2/src/daqd/PFP_KX7.cpp:228:3: warning: Value stored to 'status' is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'status' is never read in /tmp/sw_daq_tofpet2/src/daqd/PFP_KX7.cpp:228
/tmp/sw_daq_tofpet2/src/daqd/PFP_KX7.cpp:240:2: warning: Value stored to 'status' is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'status' is never read in /tmp/sw_daq_tofpet2/src/daqd/PFP_KX7.cpp:240
/tmp/sw_daq_tofpet2/src/daqd/PFP_KX7.cpp:246:2: warning: Value stored to 'status' is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'status' is never read in /tmp/sw_daq_tofpet2/src/daqd/PFP_KX7.cpp:246
/tmp/sw_daq_tofpet2/src/daqd/PFP_KX7.cpp:261:3: warning: Value stored to 'status' is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'status' is never read in /tmp/sw_daq_tofpet2/src/daqd/PFP_KX7.cpp:261
/tmp/sw_daq_tofpet2/src/daqd/PFP_KX7.cpp:272:2: warning: Value stored to 'status' is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'status' is never read in /tmp/sw_daq_tofpet2/src/daqd/PFP_KX7.cpp:272
/tmp/sw_daq_tofpet2/src/daqd/PFP_KX7.cpp:277:2: warning: Value stored to 'status' is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'status' is never read in /tmp/sw_daq_tofpet2/src/daqd/PFP_KX7.cpp:277
/tmp/sw_daq_tofpet2/src/daqd/PFP_KX7.cpp:328:2: warning: Value stored to 'status' is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'status' is never read in /tmp/sw_daq_tofpet2/src/daqd/PFP_KX7.cpp:328
/tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:268:19: warning: Potential memory leak [clang-analyzer-cplusplus.NewDeleteLeaks]
 1: Assuming 'n' is >= 'maxWorkFiles' in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:201
 2: Loop condition is false. Execution continues on line 207 in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:201
 3: Assuming 'indexFile' is not equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:213
 4: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:213
 5: Assuming 'dataFile' is not equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:221
 6: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:221
 7: Assuming 'tmpListFile' is not equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:229
 8: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:229
 9: Assuming the condition is true in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:238
10: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:238
11: 'i' is < 'nCalData' in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:244
12: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:244
13: 'maxgAsicID' is <= 'gAsicID' in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:252
14: '?' condition is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:252
15: Assuming 'f' is equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:255
16: Taking true branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:255
17: Assuming 'f' is not equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:263
18: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:263
19: Memory is allocated in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:267
20: Potential memory leak in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:268
/tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:295:2: warning: Potential leak of memory pointed to by 'tmpDataFileNames' [clang-analyzer-cplusplus.NewDeleteLeaks]
 1: Memory is allocated in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:199
 2: Assuming 'n' is >= 'maxWorkFiles' in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:201
 3: Loop condition is false. Execution continues on line 207 in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:201
 4: Assuming 'indexFile' is not equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:213
 5: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:213
 6: Assuming 'dataFile' is not equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:221
 7: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:221
 8: Assuming 'tmpListFile' is not equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:229
 9: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:229
10: Assuming the condition is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:238
11: Loop condition is false. Execution continues on line 287 in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:238
12: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:287
13: Assuming the condition is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:288
14: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:288
15: Loop condition is false. Execution continues on line 295 in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:287
16: Potential leak of memory pointed to by 'tmpDataFileNames' in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:295
/tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:295:2: warning: Potential leak of memory pointed to by 'tmpDataFiles' [clang-analyzer-cplusplus.NewDeleteLeaks]
 1: Memory is allocated in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:200
 2: Assuming 'n' is >= 'maxWorkFiles' in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:201
 3: Loop condition is false. Execution continues on line 207 in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:201
 4: Assuming 'indexFile' is not equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:213
 5: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:213
 6: Assuming 'dataFile' is not equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:221
 7: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:221
 8: Assuming 'tmpListFile' is not equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:229
 9: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:229
10: Assuming the condition is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:238
11: Loop condition is false. Execution continues on line 287 in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:238
12: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:287
13: Assuming the condition is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:288
14: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:288
15: Loop condition is false. Execution continues on line 295 in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:287
16: Potential leak of memory pointed to by 'tmpDataFiles' in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:295
/tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:361:4: warning: Value stored to 'asicPresent' is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'asicPresent' is never read in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:361
/tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:460:45: warning: Potential leak of memory pointed to by 'hFine2_list' [clang-analyzer-cplusplus.NewDeleteLeaks]
 1: Memory is allocated in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:321
 2: 'n' is < 'nQAC' in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:323
 3: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:323
 4: Assuming 'n' is >= 'nQAC' in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:323
 5: Loop condition is false. Execution continues on line 328 in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:323
 6: Assuming 'gid' is >= 'gidEnd' in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:328
 7: Loop condition is false. Execution continues on line 339 in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:328
 8: Assuming the condition is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:347
 9: Loop condition is false. Execution continues on line 365 in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:347
10: 'gid' is >= 'gidEnd' in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:368
11: Loop condition is false. Execution continues on line 460 in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:368
12: Potential leak of memory pointed to by 'hFine2_list' in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:460
/tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:524:21: warning: Potential leak of memory pointed to by 'pControlT_list' [clang-analyzer-cplusplus.NewDeleteLeaks]
 1: 'n' is < 'nQAC' in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:323
 2: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:323
 3: Assuming 'n' is >= 'nQAC' in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:323
 4: Loop condition is false. Execution continues on line 328 in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:323
 5: Assuming 'gid' is >= 'gidEnd' in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:328
 6: Loop condition is false. Execution continues on line 339 in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:328
 7: Assuming the condition is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:347
 8: Loop condition is false. Execution continues on line 365 in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:347
 9: 'gid' is >= 'gidEnd' in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:368
10: Loop condition is false. Execution continues on line 460 in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:368
11: Memory is allocated in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:460
12: 'gid' is >= 'gidEnd' in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:465
13: Loop condition is false. Execution continues on line 487 in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:465
14: Assuming the condition is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:488
15: Loop condition is false. Execution continues on line 524 in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:488
16: Potential leak of memory pointed to by 'pControlT_list' in /tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:524
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:122:13: warning: Value stored to 'configFileName' is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'configFileName' is never read in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:122
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:249:19: warning: Potential memory leak [clang-analyzer-cplusplus.NewDeleteLeaks]
 1: Assuming 'n' is >= 'maxWorkFiles' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:183
 2: Loop condition is false. Execution continues on line 189 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:183
 3: Assuming 'indexFile' is not equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:195
 4: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:195
 5: Assuming 'dataFile' is not equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:203
 6: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:203
 7: Assuming 'tmpListFile' is not equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:211
 8: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:211
 9: Assuming the condition is true in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:220
10: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:220
11: 'i' is < 'nCalData' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:226
12: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:226
13: 'maxgAsicID' is <= 'gAsicID' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:233
14: '?' condition is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:233
15: Assuming 'f' is equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:236
16: Taking true branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:236
17: Assuming 'f' is not equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:244
18: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:244
19: Memory is allocated in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:248
20: Potential memory leak in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:249
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:287:2: warning: Potential leak of memory pointed to by 'tmpDataFileNames' [clang-analyzer-cplusplus.NewDeleteLeaks]
 1: Memory is allocated in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:181
 2: Assuming 'n' is >= 'maxWorkFiles' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:183
 3: Loop condition is false. Execution continues on line 189 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:183
 4: Assuming 'indexFile' is not equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:195
 5: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:195
 6: Assuming 'dataFile' is not equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:203
 7: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:203
 8: Assuming 'tmpListFile' is not equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:211
 9: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:211
10: Assuming the condition is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:220
11: Loop condition is false. Execution continues on line 279 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:220
12: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:279
13: Assuming the condition is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:280
14: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:280
15: Loop condition is false. Execution continues on line 287 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:279
16: Potential leak of memory pointed to by 'tmpDataFileNames' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:287
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:287:2: warning: Potential leak of memory pointed to by 'tmpDataFiles' [clang-analyzer-cplusplus.NewDeleteLeaks]
 1: Memory is allocated in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:182
 2: Assuming 'n' is >= 'maxWorkFiles' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:183
 3: Loop condition is false. Execution continues on line 189 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:183
 4: Assuming 'indexFile' is not equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:195
 5: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:195
 6: Assuming 'dataFile' is not equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:203
 7: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:203
 8: Assuming 'tmpListFile' is not equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:211
 9: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:211
10: Assuming the condition is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:220
11: Loop condition is false. Execution continues on line 279 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:220
12: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:279
13: Assuming the condition is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:280
14: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:280
15: Loop condition is false. Execution continues on line 287 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:279
16: Potential leak of memory pointed to by 'tmpDataFiles' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:287
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:388:18: warning: Potential leak of memory pointed to by 'hCoarse2_list' [clang-analyzer-cplusplus.NewDeleteLeaks]
 1: Memory is allocated in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:342
 2: 'n' is < 'nTAC' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:343
 3: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:343
 4: Assuming 'n' is >= 'nTAC' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:343
 5: Loop condition is false. Execution continues on line 348 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:343
 6: Assuming 'gid' is >= 'gidEnd' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:348
 7: Loop condition is false. Execution continues on line 363 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:348
 8: Assuming the condition is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:372
 9: Loop condition is false. Execution continues on line 388 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:372
10: Potential leak of memory pointed to by 'hCoarse2_list' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:388
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:393:20: warning: Potential leak of memory pointed to by 'hFine2_list' [clang-analyzer-cplusplus.NewDeleteLeaks]
 1: Memory is allocated in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:341
 2: 'n' is < 'nTAC' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:343
 3: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:343
 4: Assuming 'n' is >= 'nTAC' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:343
 5: Loop condition is false. Execution continues on line 348 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:343
 6: Assuming 'gid' is >= 'gidEnd' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:348
 7: Loop condition is false. Execution continues on line 363 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:348
 8: Assuming the condition is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:372
 9: Loop condition is false. Execution continues on line 388 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:372
10: 'asicPresent' is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:393
11: Taking true branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:393
12: Potential leak of memory pointed to by 'hFine2_list' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:393
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:433:9: warning: Value stored to 'adcMin' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'adcMin' during its initialization is never read in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:433
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:434:9: warning: Value stored to 'adcMax' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'adcMax' during its initialization is never read in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:434
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:551:6: warning: Value stored to 'tB' is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'tB' is never read in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:551
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:552:6: warning: Value stored to 'p2' is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'p2' is never read in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:552
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:667:17: warning: Although the value stored to 'tEdge' is used in the enclosing expression, the value is never actually read from 'tEdge' [clang-analyzer-deadcode.DeadStores]
 1: Although the value stored to 'tEdge' is used in the enclosing expression, the value is never actually read from 'tEdge' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:667
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:668:14: warning: Although the value stored to 'a0' is used in the enclosing expression, the value is never actually read from 'a0' [clang-analyzer-deadcode.DeadStores]
 1: Although the value stored to 'a0' is used in the enclosing expression, the value is never actually read from 'a0' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:668
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:669:14: warning: Although the value stored to 'a1' is used in the enclosing expression, the value is never actually read from 'a1' [clang-analyzer-deadcode.DeadStores]
 1: Although the value stored to 'a1' is used in the enclosing expression, the value is never actually read from 'a1' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:669
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:670:14: warning: Although the value stored to 'a2' is used in the enclosing expression, the value is never actually read from 'a2' [clang-analyzer-deadcode.DeadStores]
 1: Although the value stored to 'a2' is used in the enclosing expression, the value is never actually read from 'a2' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:670
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:733:11: warning: Value stored to 't_' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 't_' during its initialization is never read in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:733
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:771:7: warning: Called C++ object pointer is null [clang-analyzer-core.CallAndMessage]
 1: 'n' is < 'nTAC' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:343
 2: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:343
 3: Assuming 'n' is >= 'nTAC' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:343
 4: Loop condition is false. Execution continues on line 348 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:343
 5: Assuming 'gid' is < 'gidEnd' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:348
 6: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:348
 7: Assuming 'branchID' is not equal to 0 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:350
 8: '?' condition is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:350
 9: Assuming 'gid' is >= 'gidEnd' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:348
10: Loop condition is false. Execution continues on line 363 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:348
11: Assuming the condition is true in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:372
12: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:372
13: Assuming 'i' is < 'nRead' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:375
14: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:375
15: Assuming the condition is true in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:379
16: expanded from macro 'assert' in /usr/include/assert.h:93
17: '?' condition is true in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:379
18: expanded from macro 'assert' in /usr/include/assert.h:93
19: Assuming 'j' is >= field 'freq' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:380
20: Loop condition is false. Execution continues on line 383 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:380
21: Assuming 'i' is >= 'nRead' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:375
22: Loop condition is false. Execution continues on line 372 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:375
23: Assuming the condition is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:372
24: Loop condition is false. Execution continues on line 388 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:372
25: 'asicPresent' is true in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:393
26: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:393
27: 'gid' is < 'gidEnd' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:395
28: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:395
29: Assuming 'branchID' is not equal to 0 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:397
30: '?' condition is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:397
31: Assuming 'hFine2' is not equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:409
32: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:409
33: Assuming the condition is true in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:410
34: Taking true branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:410
35:  Execution continues on line 395 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:413
36: Assuming 'gid' is < 'gidEnd' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:395
37: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:395
38: Assuming 'branchID' is equal to 0 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:397
39: '?' condition is true in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:397
40: Assuming 'hFine2' is equal to NULL in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:409
41: Taking true branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:409
42:  Execution continues on line 395 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:409
43: Assuming 'gid' is >= 'gidEnd' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:395
44: Loop condition is false. Execution continues on line 677 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:395
45: 'gid' is < 'gidEnd' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:682
46: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:682
47: Assuming field 'valid' is true in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:687
48: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:687
49: 'branchID' is not equal to 0 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:692
50: '?' condition is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:692
51: 'gid' is < 'gidEnd' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:682
52: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:682
53: Storing null pointer value in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:683
54: Assuming field 'valid' is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:687
55: Taking true branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:687
56:  Execution continues on line 682 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:687
57: 'gid' is >= 'gidEnd' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:682
58: Loop condition is false. Execution continues on line 708 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:682
59: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:709
60: 'gid' is < 'gidEnd' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:710
61: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:710
62: Field 'valid' is true in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:711
63: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:711
64: 'gid' is < 'gidEnd' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:710
65: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:710
66: Field 'valid' is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:711
67: Taking true branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:711
68:  Execution continues on line 710 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:711
69: 'gid' is >= 'gidEnd' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:710
70: Loop condition is false. Execution continues on line 716 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:710
71: Assuming the condition is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:718
72: Loop condition is false. Execution continues on line 758 in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:718
73: 'iter' is < 'nIterations' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:758
74: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:758
75: 'gid' is < 'gidEnd' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:760
76: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:760
77: Field 'valid' is true in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:762
78: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:762
79: Assuming the condition is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:771
80: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:771
81: Assuming the condition is false in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:777
82: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:777
83: 'gid' is < 'gidEnd' in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:760
84: Loop condition is true.  Entering loop body in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:760
85: Assuming field 'valid' is true in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:762
86: Taking false branch in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:762
87: 'pControlT' initialized to a null pointer value in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:764
88: Called C++ object pointer is null in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:771
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:1017:8: warning: Value stored to 'bStr' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'bStr' during its initialization is never read in /tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:1017
/tmp/sw_daq_tofpet2/src/raw_data/RawReader.cpp:36:2: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
 1: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 in /tmp/sw_daq_tofpet2/src/raw_data/RawReader.cpp:36
/tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp:73:3: warning: Potential leak of memory pointed to by 'shm' [clang-analyzer-cplusplus.NewDeleteLeaks]
 1: Assuming 'argc' is equal to 8 in /tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp:40
 2: expanded from macro 'assert' in /usr/include/assert.h:93
 3: '?' condition is true in /tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp:40
 4: expanded from macro 'assert' in /usr/include/assert.h:93
 5: Assuming the condition is false in /tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp:44
 6: Assuming the condition is false in /tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp:46
 7: Memory is allocated in /tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp:49
 8: Taking true branch in /tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp:55
 9: Assuming the condition is true in /tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp:65
10: expanded from macro 'assert' in /usr/include/assert.h:93
11: '?' condition is true in /tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp:65
12: expanded from macro 'assert' in /usr/include/assert.h:93
13: 'dataFile' is not equal to NULL in /tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp:66
14: Taking false branch in /tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp:66
15: Assuming 'indexFile' is equal to NULL in /tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp:72
16: Taking true branch in /tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp:72
17: Potential leak of memory pointed to by 'shm' in /tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp:73
/tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp:115:3: warning: Value stored to 'step1' is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'step1' is never read in /tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp:115
/tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp:116:3: warning: Value stored to 'step2' is never read [clang-analyzer-deadcode.DeadStores]
 1: Value stored to 'step2' is never read in /tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp:116
/tmp/sw_daq_tofpet2/src/base/CoarseSorter.cpp
/tmp/sw_daq_tofpet2/src/base/ProcessHit.cpp
/tmp/sw_daq_tofpet2/src/base/SystemConfig.cpp
/tmp/sw_daq_tofpet2/src/base/ThreadPool.cpp
/tmp/sw_daq_tofpet2/src/daqd/Client.cpp
/tmp/sw_daq_tofpet2/src/daqd/DAQFrameServer.cpp
/tmp/sw_daq_tofpet2/src/daqd/FrameServer.cpp
/tmp/sw_daq_tofpet2/src/daqd/PFP_KX7.cpp
/tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp
/tmp/sw_daq_tofpet2/src/raw_data/RawReader.cpp
/tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp
ferdymercury commented 3 years ago

Plus some compilation warnings:

Consolidate compiler generated dependencies of target common
[  2%] Building CXX object CMakeFiles/common.dir/src/base/SystemConfig.cpp.o
[  5%] Building CXX object CMakeFiles/common.dir/src/raw_data/RawReader.cpp.o
/tmp/sw_daq_tofpet2/src/raw_data/RawReader.cpp: In static member function ‘static PETSYS::RawReader* PETSYS::RawReader::openFile(const char*)’:
/tmp/sw_daq_tofpet2/src/raw_data/RawReader.cpp:77:19: warning: too many arguments for format [-Wformat-extra-args]
   fprintf(stderr, "Could not read from '%s'\n", fName, strerror(errno));
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/sw_daq_tofpet2/src/raw_data/RawReader.cpp:81:19: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘ssize_t’ {aka ‘long int’} [-Wformat=]
   fprintf(stderr, "Read only %d bytes from '%s', expected %d\n", r, fName, sizeof(uint64_t)*8);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~
/tmp/sw_daq_tofpet2/src/raw_data/RawReader.cpp:81:19: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘long unsigned int’ [-Wformat=]
/tmp/sw_daq_tofpet2/src/raw_data/RawReader.cpp:108:20: warning: format ‘%s’ expects argument of type ‘char*’, but argument 7 has type ‘char (*)[128]’ [-Wformat=]
    if(sscanf(line, "%d\t%u\t%u\t%u\t%s", &portID, &slaveID, &chipID, &channelID, &mode)!= 5) continue;
                    ^~~~~~~~~~~~~~~~~~~~                                          ~~~~~
/tmp/sw_daq_tofpet2/src/raw_data/RawReader.cpp:124:24: warning: format ‘%lu’ expects argument of type ‘long unsigned int*’, but argument 3 has type ‘long long unsigned int*’ [-Wformat=]
  while(fscanf(idxFile, "%lu\t%lu\t%lld\t%lld\t%f\t%f", &step.stepBegin, &step.stepEnd, &step.stepFirstFrame, &step.stepLastFrame, &step.step1, &step.step2) == 6) {
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~
/tmp/sw_daq_tofpet2/src/raw_data/RawReader.cpp:124:24: warning: format ‘%lu’ expects argument of type ‘long unsigned int*’, but argument 4 has type ‘long long unsigned int*’ [-Wformat=]
[  7%] Building CXX object CMakeFiles/common.dir/src/base/Instrumentation.cpp.o
[ 10%] Building CXX object CMakeFiles/common.dir/src/base/CoarseSorter.cpp.o
[ 12%] Building CXX object CMakeFiles/common.dir/src/base/ProcessHit.cpp.o
[ 15%] Building CXX object CMakeFiles/common.dir/src/base/SimpleGrouper.cpp.o
[ 17%] Building CXX object CMakeFiles/common.dir/src/base/CoincidenceGrouper.cpp.o
[ 20%] Linking CXX static library libcommon.a
[ 23%] Built target common
[ 25%] Building CXX object CMakeFiles/print_raw.dir/src/petsys_util/print_raw.cpp.o
/tmp/sw_daq_tofpet2/src/petsys_util/print_raw.cpp: In function ‘int main(int, char**)’:
/tmp/sw_daq_tofpet2/src/petsys_util/print_raw.cpp:80:26: warning: use of assignment suppression and length modifier together in gnu_scanf format [-Wformat=]
  while(fscanf(indexFile, "%ld %ld %*lld %*lld %f %f\n", &startOffset, &endOffset, &step1, &step2) == 4) {
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/sw_daq_tofpet2/src/petsys_util/print_raw.cpp:80:26: warning: use of assignment suppression and length modifier together in gnu_scanf format [-Wformat=]
/tmp/sw_daq_tofpet2/src/petsys_util/print_raw.cpp:119:11: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
    printf("%04d %016llx Size: %-4llu FrameID: %-20llu\n", 0, tmpRawDataFrame->data[0], tmpRawDataFrame->getFrameSize(), frameID);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     ~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/sw_daq_tofpet2/src/petsys_util/print_raw.cpp:119:11: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat=]
/tmp/sw_daq_tofpet2/src/petsys_util/print_raw.cpp:120:11: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
    printf("%04d %016llx nEvents: %20llu %4s\n", 1,  tmpRawDataFrame->data[1], tmpRawDataFrame->getNEvents(), frameLost ? "LOST" : "");
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      ~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/sw_daq_tofpet2/src/petsys_util/print_raw.cpp:120:11: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘int’ [-Wformat=]
/tmp/sw_daq_tofpet2/src/petsys_util/print_raw.cpp:131:12: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
     printf("%04d %016llx", i+2,  tmpRawDataFrame->data[i+2]);
            ^~~~~~~~~~~~~~        ~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/sw_daq_tofpet2/src/petsys_util/print_raw.cpp:132:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
     printf(" ChannelID: (%02d %02d %02d %02d)", (channelID >> 17) % 32, (channelID >> 12) % 32, (channelID >> 6) % 64, (channelID % 64));
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~
/tmp/sw_daq_tofpet2/src/petsys_util/print_raw.cpp:132:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
/tmp/sw_daq_tofpet2/src/petsys_util/print_raw.cpp:132:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat=]
/tmp/sw_daq_tofpet2/src/petsys_util/print_raw.cpp:132:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘long unsigned int’ [-Wformat=]
/tmp/sw_daq_tofpet2/src/petsys_util/print_raw.cpp:133:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
     printf(" TacID: %d TCoarse: %4d TFine: %4d ECoarse: %4d EFine: %4d", tacID, tCoarse, tFine, eCoarse, eFine);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~
/tmp/sw_daq_tofpet2/src/petsys_util/print_raw.cpp:133:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
/tmp/sw_daq_tofpet2/src/petsys_util/print_raw.cpp:133:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat=]
/tmp/sw_daq_tofpet2/src/petsys_util/print_raw.cpp:133:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘long unsigned int’ [-Wformat=]
/tmp/sw_daq_tofpet2/src/petsys_util/print_raw.cpp:133:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘long unsigned int’ [-Wformat=]
[ 28%] Linking CXX executable print_raw
[ 28%] Built target print_raw
[ 30%] Building CXX object CMakeFiles/convert_raw_to_coincidence.dir/src/petsys_util/convert_raw_to_coincidence.cpp.o
/tmp/sw_daq_tofpet2/src/petsys_util/convert_raw_to_coincidence.cpp: In member function ‘void DataFileWriter::closeStep(float, float)’:
/tmp/sw_daq_tofpet2/src/petsys_util/convert_raw_to_coincidence.cpp:160:23: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘off_t’ {aka ‘long int’} [-Wformat=]
    fprintf(indexFile, "%llu\t%llu\t%e\t%e\n", stepBegin, ftell(dataFile), step1, step2);
                       ^~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~
/tmp/sw_daq_tofpet2/src/petsys_util/convert_raw_to_coincidence.cpp:160:23: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘long int’ [-Wformat=]
/tmp/sw_daq_tofpet2/src/petsys_util/convert_raw_to_coincidence.cpp: In function ‘void displayHelp(char*)’:
/tmp/sw_daq_tofpet2/src/petsys_util/convert_raw_to_coincidence.cpp:297:19: warning: unknown conversion type character ‘\x0a’ in format [-Wformat=]
  fprintf(stderr,  "  --writeFraction N \t\t Fraction of events to write. Default: 100%.\n");
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 33%] Linking CXX executable convert_raw_to_coincidence
[ 33%] Built target convert_raw_to_coincidence
[ 35%] Building CXX object CMakeFiles/convert_raw_to_group.dir/src/petsys_util/convert_raw_to_group.cpp.o
/tmp/sw_daq_tofpet2/src/petsys_util/convert_raw_to_group.cpp: In member function ‘void DataFileWriter::closeStep(float, float)’:
/tmp/sw_daq_tofpet2/src/petsys_util/convert_raw_to_group.cpp:142:23: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘off_t’ {aka ‘long int’} [-Wformat=]
    fprintf(indexFile, "%llu\t%llu\t%e\t%e\n", stepBegin, ftell(dataFile), step1, step2);
                       ^~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~
/tmp/sw_daq_tofpet2/src/petsys_util/convert_raw_to_group.cpp:142:23: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘long int’ [-Wformat=]
/tmp/sw_daq_tofpet2/src/petsys_util/convert_raw_to_group.cpp: In function ‘void displayHelp(char*)’:
/tmp/sw_daq_tofpet2/src/petsys_util/convert_raw_to_group.cpp:245:19: warning: unknown conversion type character ‘\x0a’ in format [-Wformat=]
  fprintf(stderr,  "  --writeFraction N \t\t Fraction of events to write. Default: 100%.\n");
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 38%] Linking CXX executable convert_raw_to_group
[ 38%] Built target convert_raw_to_group
[ 41%] Building CXX object CMakeFiles/merge_raw.dir/src/petsys_util/merge_raw.cpp.o
[ 43%] Linking CXX executable merge_raw
[ 43%] Built target merge_raw
[ 46%] Building CXX object CMakeFiles/convert_raw_to_singles.dir/src/petsys_util/convert_raw_to_singles.cpp.o
/tmp/sw_daq_tofpet2/src/petsys_util/convert_raw_to_singles.cpp: In member function ‘void DataFileWriter::closeStep(float, float)’:
/tmp/sw_daq_tofpet2/src/petsys_util/convert_raw_to_singles.cpp:136:23: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘off_t’ {aka ‘long int’} [-Wformat=]
    fprintf(indexFile, "%llu\t%llu\t%e\t%e\n", stepBegin, ftell(dataFile), step1, step2);
                       ^~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~
/tmp/sw_daq_tofpet2/src/petsys_util/convert_raw_to_singles.cpp:136:23: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘long int’ [-Wformat=]
/tmp/sw_daq_tofpet2/src/petsys_util/convert_raw_to_singles.cpp: In function ‘void displayHelp(char*)’:
/tmp/sw_daq_tofpet2/src/petsys_util/convert_raw_to_singles.cpp:232:19: warning: unknown conversion type character ‘\x0a’ in format [-Wformat=]
  fprintf(stderr,  "  --writeFraction N \t\t Fraction of events to write. Default: 100%.\n");
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 48%] Linking CXX executable convert_raw_to_singles
[ 48%] Built target convert_raw_to_singles
[ 51%] Building CXX object CMakeFiles/convert_raw_to_raw.dir/src/petsys_util/convert_raw_to_raw.cpp.o
/tmp/sw_daq_tofpet2/src/petsys_util/convert_raw_to_raw.cpp: In member function ‘void DataFileWriter::addEvents(float, float, PETSYS::EventBuffer<PETSYS::RawHit>*)’:
/tmp/sw_daq_tofpet2/src/petsys_util/convert_raw_to_raw.cpp:129:23: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
     fprintf(dataFile, "%lld\t%hu\t%hu\t%hu\t%hu\t%hu\t%hu\n",
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      hit.frameID,
      ~~~~~~~~~~~       
/tmp/sw_daq_tofpet2/src/petsys_util/convert_raw_to_raw.cpp: In function ‘void displayHelp(char*)’:
/tmp/sw_daq_tofpet2/src/petsys_util/convert_raw_to_raw.cpp:171:19: warning: unknown conversion type character ‘\x0a’ in format [-Wformat=]
  fprintf(stderr,  "  --writeFraction N \t\t Fraction of events to write. Default: 100%.\n");
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 53%] Linking CXX executable convert_raw_to_raw
[ 53%] Built target convert_raw_to_raw
[ 56%] Building CXX object CMakeFiles/write_raw.dir/src/raw_data/write_raw.cpp.o
/tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp: In function ‘int main(int, char**)’:
/tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp:230:20: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘long long int’ [-Wformat=]
    fprintf(stderr, "writeRaw:: Step had %lld frames with %lld events; %f events/frame avg, %d event/frame max\n",
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp:233:6:
      stepMaxFrame); fflush(stderr);
      ~~~~~~~~~~~~   
/tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp:234:20: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long long int’ [-Wformat=]
    fprintf(stderr, "writeRaw:: some events were lost for %d (%5.1f%%) frames; all events were lost for %d (%5.1f%%) frames\n",
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      stepLostFramesN, 100.0 * stepLostFramesN / stepAllFrames,
      ~~~~~~~~~~~~~~~
/tmp/sw_daq_tofpet2/src/raw_data/write_raw.cpp:234:20: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘long long int’ [-Wformat=]
[ 58%] Building CXX object CMakeFiles/write_raw.dir/src/raw_data/shm_raw.cpp.o
[ 61%] Linking CXX executable write_raw
[ 61%] Built target write_raw
[ 64%] Building CXX object CMakeFiles/daqd.dir/src/daqd/daqd.cpp.o
/tmp/sw_daq_tofpet2/src/daqd/daqd.cpp: In function ‘int createListeningSocket(char*)’:
/tmp/sw_daq_tofpet2/src/daqd/daqd.cpp:175:49: warning: format not a string literal and no format arguments [-Wformat-security]
  snprintf(address.sun_path, PATH_MAX, socketName);
                                                 ^
[ 66%] Building CXX object CMakeFiles/daqd.dir/src/daqd/Client.cpp.o
/tmp/sw_daq_tofpet2/src/daqd/Client.cpp: In member function ‘int PETSYS::Client::handleRequest()’:
/tmp/sw_daq_tofpet2/src/daqd/Client.cpp:30:19: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
   fprintf(stderr, "Could not read() %u bytes from client %d\n", sizeof(CmdHeader_t), socket);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 69%] Building CXX object CMakeFiles/daqd.dir/src/daqd/FrameServer.cpp.o
/tmp/sw_daq_tofpet2/src/daqd/FrameServer.cpp: In constructor ‘PETSYS::FrameServer::FrameServer(int, int*, int)’:
/tmp/sw_daq_tofpet2/src/daqd/FrameServer.cpp:58:9: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
  printf("Size of frame is %u\n", sizeof(RawDataFrame));
         ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/sw_daq_tofpet2/src/daqd/FrameServer.cpp: In member function ‘bool PETSYS::FrameServer::parseDataFrame(PETSYS::RawDataFrame*)’:
/tmp/sw_daq_tofpet2/src/daqd/FrameServer.cpp:192:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
   printf("Inconsistent size: got %4d words, expected %4d words(%d events).\n",
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    frameSize, 2 + nEvents, nEvents);
    ~~~~~~~~~
/tmp/sw_daq_tofpet2/src/daqd/FrameServer.cpp: In member function ‘virtual int PETSYS::FrameServer::setIdleTimeCalculation(unsigned int)’:
/tmp/sw_daq_tofpet2/src/daqd/FrameServer.cpp:213:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
[ 71%] Building CXX object CMakeFiles/daqd.dir/src/daqd/UDPFrameServer.cpp.o
[ 74%] Building CXX object CMakeFiles/daqd.dir/src/daqd/DAQFrameServer.cpp.o
/tmp/sw_daq_tofpet2/src/daqd/DAQFrameServer.cpp: In member function ‘virtual void* PETSYS::DAQFrameServer::doWork()’:
/tmp/sw_daq_tofpet2/src/daqd/DAQFrameServer.cpp:227:20: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘long long unsigned int’ [-Wformat=]
    fprintf(stderr, "Excessive frame size: %u\n word (max is %u)", frameSize, MaxRawDataFrameQueueSize);
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~
[ 76%] Building CXX object CMakeFiles/daqd.dir/src/daqd/PFP_KX7.cpp.o
[ 79%] Building CXX object CMakeFiles/daqd.dir/src/raw_data/shm_raw.cpp.o
[ 82%] Linking CXX executable daqd
[ 82%] Built target daqd
[ 84%] Building CXX object CMakeFiles/shm_raw_py.dir/src/raw_data/shm_raw.cpp.o
[ 87%] Building CXX object CMakeFiles/shm_raw_py.dir/src/raw_data/shm_raw_py.cpp.o
[ 89%] Linking CXX shared module petsys/shm_raw.so
[ 89%] Built target shm_raw_py
[ 92%] Building CXX object CMakeFiles/process_tdc_calibration.dir/src/petsys_util/process_tdc_calibration.cpp.o
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp: In function ‘void sortData(char*, char*)’:
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:220:26: warning: use of assignment suppression and length modifier together in gnu_scanf format [-Wformat=]
  while(fscanf(indexFile, "%ld %ld %*lld %*lld %f %f\n", &startOffset, &endOffset, &step1, &step2) == 4) {
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:220:26: warning: use of assignment suppression and length modifier together in gnu_scanf format [-Wformat=]
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp: In function ‘void calibrateAsic(long unsigned int, int, int, float, float, CalibrationEntry*, float, char*)’:
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:805:20: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
    fprintf(stderr, "WARNING Channel (%2d %2d %2d %2d) has one or more uncalibrated TAC. Zero'ing out channel.\n", portID, slaveID, chipID, channelID);
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:805:20: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat=]
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:805:20: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘long unsigned int’ [-Wformat=]
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:805:20: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘long unsigned int’ [-Wformat=]
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp: In function ‘void calibrateAllAsics(int, float, float, CalibrationEntry*, float, char*, char*)’:
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:967:31: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat=]
    sprintf(summaryFilePrefix, "%s_%02d_%02d_%02d", outputFilePrefix, portID, slaveID, chipID);
                               ^~~~~~~~~~~~~~~~~~~                    ~~~~~~
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:967:31: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘long unsigned int’ [-Wformat=]
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:967:31: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘long unsigned int’ [-Wformat=]
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:968:11: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
    printf("Calibrating ASIC (%2d %2d %2d)\n", portID, slaveID, chipID);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:968:11: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
/tmp/sw_daq_tofpet2/src/petsys_util/process_tdc_calibration.cpp:968:11: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat=]
[ 94%] Linking CXX executable process_tdc_calibration
[ 94%] Built target process_tdc_calibration
[ 97%] Building CXX object CMakeFiles/process_qdc_calibration.dir/src/petsys_util/process_qdc_calibration.cpp.o
/tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp: In function ‘void sortData(char*, char*)’:
/tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:238:26: warning: use of assignment suppression and length modifier together in gnu_scanf format [-Wformat=]
  while(fscanf(indexFile, "%ld %ld %*lld %*lld %f %f\n", &startOffset, &endOffset, &step1, &step2) == 4) {
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:238:26: warning: use of assignment suppression and length modifier together in gnu_scanf format [-Wformat=]
/tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp: In function ‘void calibrateAllAsics(PETSYS::SystemConfig*, CalibrationEntry*, char*, int, float, float, char*)’:
/tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:682:31: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat=]
    sprintf(summaryFilePrefix, "%s_%02d_%02d_%02d", outputFilePrefix, portID, slaveID, chipID);
                               ^~~~~~~~~~~~~~~~~~~                    ~~~~~~
/tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:682:31: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘long unsigned int’ [-Wformat=]
/tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:682:31: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘long unsigned int’ [-Wformat=]
/tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:683:11: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
    printf("Calibrating ASIC (%2d %2d %2d)\n", portID, slaveID, chipID);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~
/tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:683:11: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
/tmp/sw_daq_tofpet2/src/petsys_util/process_qdc_calibration.cpp:683:11: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat=]
[100%] Linking CXX executable process_qdc_calibration
[100%] Built target process_qdc_calibration
rbugalho commented 3 years ago

Thanks for the heads up. I've cleaned the compilation warnings, the clang-tidy warnings will be next.