From 01f63c8d7c526a5909c6384b41198faaaccea7a6 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 15 Sep 2017 21:09:19 +0200 Subject: [PATCH] Can't declare variable after goto. --- server/TracyView.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 9eda6b26..25be030d 100755 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -56,12 +56,14 @@ void View::Worker() if( m_shutdown.load( std::memory_order_relaxed ) ) return; if( !m_sock.Connect( m_addr.c_str(), "8086" ) ) continue; + std::chrono::time_point t0; + uint8_t lz4; if( !m_sock.Read( &m_timeBegin, sizeof( m_timeBegin ), &tv, ShouldExit ) ) goto close; if( !m_sock.Read( &lz4, sizeof( lz4 ), &tv, ShouldExit ) ) goto close; - auto t0 = std::chrono::high_resolution_clock::now(); + t0 = std::chrono::high_resolution_clock::now(); uint64_t bytes = 0; for(;;)