Boring warning fixes.

This commit is contained in:
Bartosz Taudul 2020-03-01 01:48:20 +01:00
parent 8f9ba5d54a
commit c36ed4b8b8
4 changed files with 10 additions and 14 deletions

View File

@ -2438,8 +2438,6 @@ void Profiler::CalibrateDelay()
enum { Events = Iterations * 2 }; // start + end enum { Events = Iterations * 2 }; // start + end
static_assert( Events < QueuePrealloc, "Delay calibration loop will allocate memory in queue" ); static_assert( Events < QueuePrealloc, "Delay calibration loop will allocate memory in queue" );
moodycamel::ProducerToken ptoken_detail( GetQueue() );
moodycamel::ConcurrentQueue<QueueItem>::ExplicitProducer* ptoken = GetQueue().get_explicit_producer( ptoken_detail );
static const tracy::SourceLocationData __tracy_source_location { nullptr, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 }; static const tracy::SourceLocationData __tracy_source_location { nullptr, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 };
const auto t0 = GetTime(); const auto t0 = GetTime();
for( int i=0; i<Iterations; i++ ) for( int i=0; i<Iterations; i++ )
@ -2591,7 +2589,7 @@ void Profiler::ReportTopology()
cpuData[i].core = uint32_t( atoi( buf ) ); cpuData[i].core = uint32_t( atoi( buf ) );
} }
for( uint32_t i=0; i<numcpus; i++ ) for( int i=0; i<numcpus; i++ )
{ {
auto& data = cpuData[i]; auto& data = cpuData[i];

View File

@ -17,7 +17,7 @@ static inline bool SourceFileValid( const char* fn, uint64_t olderThan )
struct stat buf; struct stat buf;
if( stat( fn, &buf ) == 0 && ( buf.st_mode & S_IFREG ) != 0 ) if( stat( fn, &buf ) == 0 && ( buf.st_mode & S_IFREG ) != 0 )
{ {
return buf.st_mtime < olderThan; return (uint64_t)buf.st_mtime < olderThan;
} }
return false; return false;
} }

View File

@ -6098,7 +6098,7 @@ void View::DrawZoneInfoWindow()
int64_t running = it->End() - ev.Start(); int64_t running = it->End() - ev.Start();
cpus[it->Cpu()] = 1; cpus[it->Cpu()] = 1;
++it; ++it;
for( int64_t i=0; i<cnt-2; i++ ) for( uint64_t i=0; i<cnt-2; i++ )
{ {
running += it->End() - it->Start(); running += it->End() - it->Start();
cpus[it->Cpu()] = 1; cpus[it->Cpu()] = 1;
@ -7974,13 +7974,13 @@ void View::DrawOptions()
const auto srcval = m_threadOrder[source]; const auto srcval = m_threadOrder[source];
if( target < source ) if( target < source )
{ {
assert( source < m_threadOrder.size() ); assert( source < (int)m_threadOrder.size() );
m_threadOrder.erase( m_threadOrder.begin() + source ); m_threadOrder.erase( m_threadOrder.begin() + source );
m_threadOrder.insert( m_threadOrder.begin() + target, srcval ); m_threadOrder.insert( m_threadOrder.begin() + target, srcval );
} }
else else
{ {
assert( target <= m_threadOrder.size() ); assert( target <= (int)m_threadOrder.size() );
m_threadOrder.insert( m_threadOrder.begin() + target, srcval ); m_threadOrder.insert( m_threadOrder.begin() + target, srcval );
m_threadOrder.erase( m_threadOrder.begin() + source ); m_threadOrder.erase( m_threadOrder.begin() + source );
} }
@ -11518,7 +11518,6 @@ void View::DrawCallstackWindow()
} }
ImGui::NextColumn(); ImGui::NextColumn();
{ {
ImGuiWindow* window = ImGui::GetCurrentWindow();
ImGui::PushTextWrapPos( 0.0f ); ImGui::PushTextWrapPos( 0.0f );
if( txt[0] == '[' ) if( txt[0] == '[' )
{ {
@ -13475,7 +13474,6 @@ void View::DrawSampleParents()
} }
ImGui::NextColumn(); ImGui::NextColumn();
{ {
ImGuiWindow* window = ImGui::GetCurrentWindow();
ImGui::PushTextWrapPos( 0.0f ); ImGui::PushTextWrapPos( 0.0f );
if( txt[0] == '[' ) if( txt[0] == '[' )
{ {
@ -15762,7 +15760,7 @@ bool View::GetZoneRunningTime( const ContextSwitch* ctx, const ZoneEvent& ev, in
{ {
int64_t running = it->End() - ev.Start(); int64_t running = it->End() - ev.Start();
++it; ++it;
for( int64_t i=0; i<cnt-2; i++ ) for( uint64_t i=0; i<cnt-2; i++ )
{ {
running += it->End() - it->Start(); running += it->End() - it->Start();
++it; ++it;

View File

@ -277,7 +277,7 @@ Worker::Worker( const std::string& program, const std::vector<ImportEventTimelin
} }
if( !messages.empty() ) if( !messages.empty() )
{ {
if( m_data.lastTime < messages.back().timestamp ) m_data.lastTime = messages.back().timestamp; if( m_data.lastTime < (int64_t)messages.back().timestamp ) m_data.lastTime = messages.back().timestamp;
} }
for( auto& v : timeline ) for( auto& v : timeline )
@ -1486,7 +1486,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
} }
td->Sync(); td->Sync();
td.reset(); td.reset();
for( size_t i=0; i<jobs; i++ ) for( int i=0; i<jobs; i++ )
{ {
if( data[i].state.load( std::memory_order_acquire ) == JobData::DataReady ) if( data[i].state.load( std::memory_order_acquire ) == JobData::DataReady )
{ {
@ -2186,7 +2186,7 @@ const char* Worker::GetThreadName( uint64_t id ) const
{ {
// Client should send additional information about thread name, to make this check unnecessary // Client should send additional information about thread name, to make this check unnecessary
const auto txt = it->second; const auto txt = it->second;
if( txt[0] >= '0' && txt[0] <= '9' && atoi( txt ) == id ) if( txt[0] >= '0' && txt[0] <= '9' && (uint64_t)atoi( txt ) == id )
{ {
const auto eit = m_data.externalNames.find( id ); const auto eit = m_data.externalNames.find( id );
if( eit != m_data.externalNames.end() ) if( eit != m_data.externalNames.end() )
@ -3967,7 +3967,7 @@ void Worker::ProcessFrameImage( const QueueFrameImage& ev )
m_data.frameImage.push_back( fi ); m_data.frameImage.push_back( fi );
m_pendingFrameImageData.erase( it ); m_pendingFrameImageData.erase( it );
if( fidx >= frames.size() ) if( fidx >= (int64_t)frames.size() )
{ {
if( m_frameImageStaging.find( fidx ) != m_frameImageStaging.end() ) if( m_frameImageStaging.find( fidx ) != m_frameImageStaging.end() )
{ {