From f7d85231f2ac6efcda71bbd972442da6d14dfcc1 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Fri, 7 Apr 2017 14:12:21 +0200 Subject: [PATCH] solved warnings except sscanf for uint64_t --- slsReceiverSoftware/include/logger.h | 11 ++++------- .../src/UDPStandardImplementation.cpp | 12 +++++++----- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/slsReceiverSoftware/include/logger.h b/slsReceiverSoftware/include/logger.h index a91dea9f4..d01b1db2d 100644 --- a/slsReceiverSoftware/include/logger.h +++ b/slsReceiverSoftware/include/logger.h @@ -7,16 +7,13 @@ #include #include -#ifdef VERBOSE -#define FILELOG_MAX_LEVEL logDEBUG -#endif - -#ifdef VERYVERBOSE -#define FILELOG_MAX_LEVEL logDEBUG4 -#endif #ifdef FIFODEBUG #define FILELOG_MAX_LEVEL logDEBUG5 +#elif VERYVERBOSE +#define FILELOG_MAX_LEVEL logDEBUG4 +#elif VERBOSE +#define FILELOG_MAX_LEVEL logDEBUG #endif #ifndef FILELOG_MAX_LEVEL diff --git a/slsReceiverSoftware/src/UDPStandardImplementation.cpp b/slsReceiverSoftware/src/UDPStandardImplementation.cpp index c31a037cb..d26ec75ca 100644 --- a/slsReceiverSoftware/src/UDPStandardImplementation.cpp +++ b/slsReceiverSoftware/src/UDPStandardImplementation.cpp @@ -20,6 +20,7 @@ #include //zmq #include +#include //printf of uint64_t etc using namespace std; @@ -1531,11 +1532,12 @@ int UDPStandardImplementation::setupWriter(){ tempname=tempname.substr(0,uscore); startAcquisitionCallBack(filePath, (char*)tempname.c_str(),fileIndex, (uint32_t)bufferSize,pStartAcquisition); } - if (rawDataReadyCallBack) + if (rawDataReadyCallBack) { FILE_LOG(logINFO) << "Data Write has been defined externally"; - if (!fileWriteEnable) + } + if (!fileWriteEnable) { FILE_LOG(logINFO) << "Data will not be saved"; - + } //creating first file @@ -2346,7 +2348,7 @@ int UDPStandardImplementation::prepareAndListenBufferCompleteFrames(int ithread) #ifdef VERBOSE if(!ithread) cprintf(BLUE, - "framenumber:%llu\tsubfnum:%u\tpnum:%u\tbunchid:%llu\txcoord:%u\tdettype:%u\tversion:%u\n", + "framenumber:%lu\tsubfnum:%u\tpnum:%u\tbunchid:%lu\txcoord:%u\tdettype:%u\tversion:%u\n", header->frameNumber, header->expLength, header->packetNumber, header->bunchId, header->xCoord, header->detType, header->version); #endif @@ -3325,7 +3327,7 @@ void UDPStandardImplementation::handleDataCompression(int ithread, char* wbuffer break; } - while(buff[0] = receiverData[ithread]->findNextFrame(data,ndata,remainingsize)){ + while((buff[0] = receiverData[ithread]->findNextFrame(data,ndata,remainingsize))){ //remaining number of packets np = ndata/onePacketSize;