Skip to content

Commit 14a3282

Browse files
fix compilation error.
1 parent b46ebd6 commit 14a3282

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

src/tabstractwebsocket.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ int TAbstractWebSocket::parse(QByteArray &recvData)
259259
}
260260

261261
tSystemDebug("WebSocket parse header pos: {}", devhdr->pos());
262-
tSystemDebug("WebSocket payload length:{}", pfrm->payloadLength());
262+
tSystemDebug("WebSocket payload length:{}", (quint64)pfrm->payloadLength());
263263

264264
int hdrlen = hdr.length() - devhdr->bytesAvailable();
265265
ds.skipRawData(hdrlen); // Forwards the pos
@@ -269,7 +269,7 @@ int TAbstractWebSocket::parse(QByteArray &recvData)
269269
case TWebSocketFrame::HeaderParsed: // fall through
270270
case TWebSocketFrame::MoreData: {
271271
tSystemDebug("WebSocket reading payload: available length:{}", dev->bytesAvailable());
272-
tSystemDebug("WebSocket parsing length to read:{} current buf len:{}", pfrm->payloadLength(), (qint64)pfrm->payload().size());
272+
tSystemDebug("WebSocket parsing length to read:{} current buf len:{}", (quint64)pfrm->payloadLength(), (qint64)pfrm->payload().size());
273273
uint64_t size = std::min((uint64_t)(pfrm->payloadLength() - pfrm->payload().size()), (uint64_t)dev->bytesAvailable());
274274
if (Q_UNLIKELY(size == 0)) {
275275
Q_ASSERT(0);

src/tepoll.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ void TEpoll::dispatchEvents()
216216
Q_ASSERT(sd->buffer == nullptr);
217217

218218
QByteArray secKey = sd->header.rawHeader("Sec-WebSocket-Key");
219-
tSystemDebug("secKey: {}", secKey.data());
219+
tSystemDebug("secKey: {}", (const char*)secKey.data());
220220
int newsocket = TApplicationServerBase::duplicateSocket(sock->socketDescriptor());
221221

222222
// Switch to WebSocket

src/tepollhttpsocket.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ bool TEpollHttpSocket::seekRecvBuffer(int pos)
138138
QByteArray connectionHeader = header.rawHeader("Connection").toLower();
139139
if (connectionHeader.contains("upgrade")) {
140140
QByteArray upgradeHeader = header.rawHeader("Upgrade").toLower();
141-
tSystemDebug("Upgrade: {}", upgradeHeader.data());
141+
tSystemDebug("Upgrade: {}", (const char*)upgradeHeader.data());
142142

143143
if (upgradeHeader == "websocket") {
144144
if (TWebSocket::searchEndpoint(header)) {

src/tepollwebsocket.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ TEpollWebSocket::TEpollWebSocket(int socketDescriptor, const QHostAddress &addre
3131
TEpollSocket(socketDescriptor, Tf::SocketState::Connected, address),
3232
TAbstractWebSocket(header)
3333
{
34-
tSystemDebug("TEpollWebSocket [{:#x}]", (uintptr_t)this);
34+
tSystemDebug("TEpollWebSocket [{:#x}]", (quintptr)this);
3535
socketManager.insert(socketDescriptor, this);
3636
_recvBuffer.reserve(BUFFER_RESERVE_SIZE);
3737
}
@@ -40,7 +40,7 @@ TEpollWebSocket::TEpollWebSocket(int socketDescriptor, const QHostAddress &addre
4040
TEpollWebSocket::~TEpollWebSocket()
4141
{
4242
socketManager.remove(socketDescriptor());
43-
tSystemDebug("~TEpollWebSocket [{:#x}]", (uintptr_t)this);
43+
tSystemDebug("~TEpollWebSocket [{:#x}]", (quintptr)this);
4444
}
4545

4646

src/tglobal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ constexpr auto TF_SRC_REVISION = 2956;
99
#include <version>
1010

1111

12-
#if defined(__cpp_lib_format) || __has_include(<format>) // std::format
12+
#if (!defined(Q_OS_WIN) && (defined(__cpp_lib_format) || __has_include(<format>))) || (defined(_MSC_VER) && _MSC_VER >= 1930) // std::format
1313
#define TF_HAVE_STD_FORMAT
1414
#endif
1515

src/tsharedmemoryallocator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ void TSharedMemoryAllocator::setbrk(bool initial)
150150
pb_header->endg = _sharedMemory->size();
151151
pb_header->checksum = (uint64_t)_sharedMemory->size() * (uint64_t)_sharedMemory->size();
152152
}
153-
tSystemDebug("checksum = {}", pb_header->checksum);
153+
tSystemDebug("checksum = {}", (qint64)pb_header->checksum);
154154

155155
_origin = pb_header->start() + sizeof(Tf::alloc_header_t);
156156
}
@@ -427,7 +427,7 @@ void TSharedMemoryAllocator::summary() const
427427
}
428428

429429
tSystemDebug("-- memory block summary --");
430-
tSystemDebug("table info: blocks = {}, free = {}, used = {}", countBlocks(), countFreeBlocks(), pb_header->at.used);
430+
tSystemDebug("table info: blocks = {}, free = {}, used = {}", countBlocks(), countFreeBlocks(), (quint64)pb_header->at.used);
431431
}
432432

433433
// Debug function to print the entire link list

src/tthreadapplicationserver_linux.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ void TThreadApplicationServer::run()
115115
Tf::msleep(1);
116116
}
117117

118-
tSystemDebug("thread ptr: {}", (uint64_t)thread);
118+
tSystemDebug("thread ptr: {}", (quint64)thread);
119119
thread->setSocketDescriptor(socketDescriptor);
120120
thread->start();
121121
}

0 commit comments

Comments
 (0)