From 064a8dfaa2f2d9cb10130268bda16efe6ba1e2f7 Mon Sep 17 00:00:00 2001 From: "hellner@google.com" Date: Tue, 16 Aug 2011 15:52:28 +0000 Subject: [PATCH] Minimal fixes to remove build warnings. Review URL: http://webrtc-codereview.appspot.com/113004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@376 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/system_wrappers/source/trace_impl.cc | 6 ++++-- src/system_wrappers/source/trace_posix.cc | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) 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; }