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:
mwl4 2023-01-25 15:08:51 +01:00
parent d47122586c
commit 789f572332

View File

@ -1265,8 +1265,7 @@ void SysTraceWorker( void* ptr )
type = QueueType::HwSampleBranchMiss;
break;
default:
assert( false );
break;
abort();
}
TracyLfqPrepare( type );