Skip to content

Commit

Permalink
Merge pull request #18997 from richardkchapman/HPCC-32439
Browse files Browse the repository at this point in the history
HPCC-32439 Make all warnings into errors in Roxie subdirectory

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Merged-by: Gavin Halliday <ghalliday@hpccsystems.com>
  • Loading branch information
ghalliday authored Oct 9, 2024
2 parents 66d1b8c + a8c6552 commit e2074a3
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 11 deletions.
1 change: 1 addition & 0 deletions roxie/ccd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@


project( ccd )
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${STRICT_CXX_FLAGS}")

IF (USE_TBBMALLOC AND USE_TBBMALLOC_ROXIE)
find_package(TBB CONFIG REQUIRED)
Expand Down
1 change: 1 addition & 0 deletions roxie/ccdcache/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@


project( ccdcache )
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${STRICT_CXX_FLAGS}")

set ( SRCS
ccdcache.cpp
Expand Down
1 change: 1 addition & 0 deletions roxie/roxie/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@


project( roxie )
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${STRICT_CXX_FLAGS}")

set ( SRCS
roxie.cpp
Expand Down
1 change: 1 addition & 0 deletions roxie/roxiemem/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#####################################################

project( roxiemem )
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${STRICT_CXX_FLAGS}")

if(USE_TBB)
find_package(TBB CONFIG REQUIRED)
Expand Down
1 change: 1 addition & 0 deletions roxie/roxiepipe/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@


project( roxiepipe )
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${STRICT_CXX_FLAGS}")

set ( SRCS
roxiepipe.cpp
Expand Down
1 change: 1 addition & 0 deletions roxie/topo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@


project( toposerver )
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${STRICT_CXX_FLAGS}")

set ( SRCS
toposerver.cpp
Expand Down
1 change: 1 addition & 0 deletions roxie/udplib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@


project (AllProjects)
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${STRICT_CXX_FLAGS}")

include ( udplib.cmake)
include ( udptransport.cmake)
Expand Down
4 changes: 3 additions & 1 deletion roxie/udplib/udpmsgpk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ class PackageSequencer : public CInterface, implements IInterface
unsigned headerSize;
const RoxiePacketHeader *header;
unsigned maxSeqSeen = 0;
#ifdef _DEBUG
unsigned numPackets = 0;
#endif
bool outOfBand = false;

MemoryBuffer metadata;
Expand Down Expand Up @@ -219,7 +221,7 @@ class PackageSequencer : public CInterface, implements IInterface
unsigned pktseq = fingerHdr->pktSeq & UDP_PACKET_SEQUENCE_MASK;
if (pktseq == prevseq+1)
{
unsigned packetDataSize = fingerHdr->length - fingerHdr->metalength - sizeof(UdpPacketHeader);
[[maybe_unused]] unsigned packetDataSize = fingerHdr->length - fingerHdr->metalength - sizeof(UdpPacketHeader);
assert(packetDataSize < roxiemem::DATA_ALIGNMENT_SIZE);
if (pktseq == 0)
{
Expand Down
6 changes: 3 additions & 3 deletions roxie/udplib/udpsim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void initOptions(int argc, const char **argv)
{
Owned<IPropertyTree> defaults = createPTreeFromYAMLString(defaultYaml);
IPropertyTree * allowed = defaults->queryPropTree("udpsim");
for (unsigned argNo = 1; argNo < argc; argNo++)
for (int argNo = 1; argNo < argc; argNo++)
{
const char *arg = argv[argNo];
if (arg[0]=='-' && arg[1]=='-')
Expand Down Expand Up @@ -248,7 +248,7 @@ static unsigned completedThreads = 0;

void simulateTraffic()
{
const unsigned maxSendQueueSize = 100;
unsigned maxSendQueueSize = 100;
try
{
myNode.setIp(IpAddress("1.2.3.4"));
Expand All @@ -258,7 +258,7 @@ void simulateTraffic()
unsigned begin = msTick();
std::atomic<unsigned> workValue{0};

asyncFor(numThreads+1, numThreads+1, [&workValue, maxSendQueueSize, &rm, &mc, &rowManager](unsigned i)
asyncFor(numThreads+1, numThreads+1, [&workValue, &rm, &mc, &rowManager, maxSendQueueSize](unsigned i)
{
if (!i)
{
Expand Down
4 changes: 1 addition & 3 deletions roxie/udplib/udptrr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -953,8 +953,6 @@ class CReceiveManager : implements IReceiveManager, public CInterface
void noteDone(UdpSenderEntry *requester, const UdpRequestToSendMsg &msg)
{
const unsigned flowSeq = msg.flowSeq;
SendPermit * permit = requester->queryPermit(flowSeq);

//A completed message, on the data flow, may often be received after the next request to send.
//If so it should not update the state, but it should clear all grants with a flowid <= the new flowid
//since all the data will have been sent. (If it has not been received it is either lost or OOO (unlikely).)
Expand Down Expand Up @@ -1538,7 +1536,7 @@ class CReceiveManager : implements IReceiveManager, public CInterface
//any other sender for the udpPermitTimeout period
unsigned maxSlotsPerClient = (udpMaxPendingPermits == 1) ? queue_size : (udpMaxClientPercent * queue_size) / (udpMaxPendingPermits * 100);
assertex(maxSlotsPerClient != 0);
if (maxSlotsPerClient > queue_size)
if ((int) maxSlotsPerClient > queue_size)
maxSlotsPerClient = queue_size;
if (udpResendLostPackets && maxSlotsPerClient > TRACKER_BITS)
maxSlotsPerClient = TRACKER_BITS;
Expand Down
2 changes: 1 addition & 1 deletion roxie/udplib/udptrs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ class CSendManager : implements ISendManager, public CInterface
#endif
while(running)
{
UdpPermitToSendMsg f = { flowType::ok_to_send, 0, { } };
UdpPermitToSendMsg f = { flowType::ok_to_send, 0, 0, { }, { } };
unsigned readsize = udpResendLostPackets ? sizeof(UdpPermitToSendMsg) : offsetof(UdpPermitToSendMsg, seen);
while (running)
{
Expand Down
6 changes: 3 additions & 3 deletions roxie/udplib/uttest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class Receiver : public Thread
allReceived = 0;
}

virtual void start()
void startReceiver()
{
Thread::start(false);
started.wait();
Expand Down Expand Up @@ -297,7 +297,7 @@ void testNxN()
DBGLOG("Ready to start");
if (receiving)
{
receiver.start();
receiver.startReceiver();
if (numNodes > 1)
Sleep(5000);
}
Expand Down Expand Up @@ -563,7 +563,7 @@ class SortSlave : public Thread
}
void sendTo(unsigned datasize, unsigned slaveIdx)
{
assert(slaveIdx != myIdx);
assert(slaveIdx != (unsigned) myIdx);
DBGLOG("Node %d sending %d bytes to node %d", myIdx, datasize, slaveIdx);
master->noteTransferStart(myIdx, slaveIdx);
Sleep(datasize);
Expand Down

0 comments on commit e2074a3

Please sign in to comment.