Skip to content

Commit

Permalink
fix linux x64 build warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanshudong committed Oct 12, 2023
1 parent 1125ade commit a0bdac7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
13 changes: 9 additions & 4 deletions unit-test/rpc/test_async_rpc.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@

#include "hello_test.h"


TEST_F(HelloTest, rpcASyncGlobalCommunicator)
{
cout << TC_Thread::CURRENT_THREADID() << endl;

shared_ptr<Communicator> c = getCommunicator();
{
shared_ptr<Communicator> c = getCommunicator();

transGlobalCommunicator([&](Communicator *comm){
checkASync(comm);
}, c.get());
transGlobalCommunicator([&](Communicator *comm) {
checkASync(comm);
}, c.get());
}

cout << getFdCounts() << endl;
}


Expand Down
6 changes: 5 additions & 1 deletion util/include/util/tc_logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,11 @@ namespace tars

if (hasFlag(TC_Logger::HAS_PID))
{
n += snprintf(c + n, len - n, "%lld%s", TC_Thread::CURRENT_THREADID(), _sSepar.c_str());
#if __WORDSIZE == 64
n += snprintf(c + n, len - n, "%ld%s", TC_Thread::CURRENT_THREADID(), _sSepar.c_str());
#else
n += snprintf(c + n, len - n, "%lld%s", TC_Thread::CURRENT_THREADID(), _sSepar.c_str());
#endif
}

if (hasFlag(TC_Logger::HAS_LEVEL))
Expand Down

0 comments on commit a0bdac7

Please sign in to comment.