Closed ferdymercury closed 1 year 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
Thanks for the heads up. I've cleaned the compilation warnings, the clang-tidy warnings will be next.
Clang-tidy reports some warnings when analyzing the code, some of them are not important, but others might be memory leaks: