diff --git a/src/system_wrappers/source/trace_impl.cc b/src/system_wrappers/source/trace_impl.cc index 6a9fbab2e2..c9be30ab9f 100644 --- a/src/system_wrappers/source/trace_impl.cc +++ b/src/system_wrappers/source/trace_impl.cc @@ -832,7 +832,8 @@ bool TraceImpl::UpdateFileName( } memcpy(fileNameWithCounterUTF8, fileNameUTF8, lengthTo_); - sprintf(fileNameWithCounterUTF8+lengthTo_, "_%lu%s", newCount, + sprintf(fileNameWithCounterUTF8+lengthTo_, "_%lu%s", + static_cast (newCount), fileNameUTF8+lengthWithoutFileEnding); return true; } @@ -865,7 +866,8 @@ bool TraceImpl::CreateFileName( } memcpy(fileNameWithCounterUTF8, fileNameUTF8, lengthWithoutFileEnding); sprintf(fileNameWithCounterUTF8+lengthWithoutFileEnding, "_%lu%s", - newCount, fileNameUTF8+lengthWithoutFileEnding); + static_cast (newCount), + fileNameUTF8+lengthWithoutFileEnding); return true; } diff --git a/src/system_wrappers/source/trace_posix.cc b/src/system_wrappers/source/trace_posix.cc index 5fc60bf992..9bdd346f09 100644 --- a/src/system_wrappers/source/trace_posix.cc +++ b/src/system_wrappers/source/trace_posix.cc @@ -51,7 +51,8 @@ TracePosix::~TracePosix() WebRtc_Word32 TracePosix::AddThreadId(char* traceMessage) const { WebRtc_UWord64 threadId = (WebRtc_UWord64)pthread_self(); - sprintf(traceMessage, "%10llu; ", threadId); + sprintf(traceMessage, "%10llu; ", + static_cast(threadId)); // 12 bytes are written. return 12; }