Fix a build error when compiling with clang
Fix the following error:
roctx.cpp:91:25: error: reinterpret_cast from 'const void *' to 'decltype(report_activity.load())' (aka 'int (*)(activity_domain_t, unsigned int, void *)') casts away qualifiers
report_activity.store(reinterpret_cast<decltype(report_activity.load())>(function),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
by replacing the 'const void *function' argument with the correct type.
Change-Id: I912239daf6f4a3f00fc753306b84833e5c75f74b
Этот коммит содержится в:
@@ -87,7 +87,8 @@ ROCTX_API void roctxRangeStop(roctx_range_id_t range_id) {
|
||||
ReportActivity(ROCTX_API_ID_roctxRangeStop, nullptr, range_id);
|
||||
}
|
||||
|
||||
extern "C" ROCTX_EXPORT void roctxRegisterTracerCallback(const void* function) {
|
||||
report_activity.store(reinterpret_cast<decltype(report_activity.load())>(function),
|
||||
std::memory_order_relaxed);
|
||||
extern "C" ROCTX_EXPORT void roctxRegisterTracerCallback(int (*function)(activity_domain_t domain,
|
||||
uint32_t operation_id,
|
||||
void* data)) {
|
||||
report_activity.store(function, std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user