mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
Fix compilation on linux: use abort() instead of assert( false ).
assert() in release configuration resolves to empty code, while abort() is marked as [[noreturn]] and always is available. gcc error: error: ‘type’ may be used uninitialized in this function [-Werror=maybe-uninitialized]: public/tracy/../client/../common/TracyAlign.hpp: In function ‘void tracy::SysTraceWorker(void*)’: public/tracy/../client/../common/TracyAlign.hpp:22:11: error: ‘type’ may be used uninitialized in this function [-Werror=maybe-uninitialized] memcpy( ptr, &val, sizeof( T ) ); ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from public/TracyClient.cpp:26, from X.cpp: public/client/TracySysTrace.cpp:1258:35: note: ‘type’ was declared here QueueType type; ^~~~
This commit is contained in:
parent
d47122586c
commit
789f572332
@ -1265,8 +1265,7 @@ void SysTraceWorker( void* ptr )
|
||||
type = QueueType::HwSampleBranchMiss;
|
||||
break;
|
||||
default:
|
||||
assert( false );
|
||||
break;
|
||||
abort();
|
||||
}
|
||||
|
||||
TracyLfqPrepare( type );
|
||||
|
Loading…
Reference in New Issue
Block a user