Fixes Valgrind warnings in system_wrapper.
Review URL: http://webrtc-codereview.appspot.com/48002 git-svn-id: http://webrtc.googlecode.com/svn/trunk@114 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
2f887323a0
commit
d3b208d1c9
@ -23,9 +23,13 @@ CpuLinux::CpuLinux()
|
||||
m_numCores = 0;
|
||||
m_numCores = GetNumCores();
|
||||
m_oldBusyTimeMulti = new long long[m_numCores];
|
||||
memset(m_oldBusyTimeMulti, 0, sizeof(long long) * m_numCores);
|
||||
m_oldIdleTimeMulti = new long long[m_numCores];
|
||||
memset(m_oldIdleTimeMulti, 0, sizeof(long long) * m_numCores);
|
||||
m_idleArray = new long long[m_numCores];
|
||||
memset(m_idleArray, 0, sizeof(long long) * m_numCores);
|
||||
m_busyArray = new long long[m_numCores];
|
||||
memset(m_busyArray, 0, sizeof(long long) * m_numCores);
|
||||
m_resultArray = new WebRtc_UWord32[m_numCores];
|
||||
|
||||
GetData(m_oldBusyTime, m_oldIdleTime, m_busyArray, m_idleArray);
|
||||
|
@ -82,8 +82,9 @@ WebRtc_Word32 TraceLinux::AddTime(char* traceMessage,
|
||||
dwDeltaTime = 99999;
|
||||
}
|
||||
|
||||
sprintf (traceMessage, "(%2u:%2u:%2u:%3u |%5lu) ", systemTime.tm_hour,
|
||||
systemTime.tm_min, systemTime.tm_sec, 0, dwDeltaTime);
|
||||
sprintf(traceMessage, "(%2u:%2u:%2u:%3u |%5lu) ", systemTime.tm_hour,
|
||||
systemTime.tm_min, systemTime.tm_sec, 0,
|
||||
static_cast<unsigned long>(dwDeltaTime));
|
||||
} else {
|
||||
WebRtc_UWord32 dwDeltaTime = dwCurrentTimeInSeconds - _prevAPITickCount;
|
||||
_prevAPITickCount = dwCurrentTimeInSeconds;
|
||||
@ -100,8 +101,9 @@ WebRtc_Word32 TraceLinux::AddTime(char* traceMessage,
|
||||
{
|
||||
dwDeltaTime = 99999;
|
||||
}
|
||||
sprintf (traceMessage, "(%2u:%2u:%2u:%3u |%5lu) ", systemTime.tm_hour,
|
||||
systemTime.tm_min, systemTime.tm_sec, 0, dwDeltaTime);
|
||||
sprintf(traceMessage, "(%2u:%2u:%2u:%3u |%5lu) ", systemTime.tm_hour,
|
||||
systemTime.tm_min, systemTime.tm_sec, 0,
|
||||
static_cast<unsigned long>(dwDeltaTime));
|
||||
}
|
||||
// Messages is 22 characters.
|
||||
return 22;
|
||||
|
Loading…
Reference in New Issue
Block a user