Skip to content

Commit a8f9f85

Browse files
committed
[Libomptarget][NFC] Fix unused variable warnings
Summary: This patch fixes a few warnings that would show up while building.
1 parent 5ae9ffb commit a8f9f85

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1885,8 +1885,8 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
18851885
// Get the frequency of the steady clock. If the attribute is missing
18861886
// assume running on an older libhsa and default to 0, omp_get_wtime
18871887
// will be inaccurate but otherwise programs can still run.
1888-
if (auto Err = getDeviceAttrRaw(HSA_AMD_AGENT_INFO_TIMESTAMP_FREQUENCY,
1889-
ClockFrequency))
1888+
if (getDeviceAttrRaw(HSA_AMD_AGENT_INFO_TIMESTAMP_FREQUENCY,
1889+
ClockFrequency) != HSA_STATUS_SUCCESS)
18901890
ClockFrequency = 0;
18911891

18921892
// Load the grid values dependending on the wavefront.

openmp/libomptarget/src/interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ EXTERN void __tgt_target_nowait_query(void **AsyncHandle) {
495495
if (QueryCounter.isAboveThreshold())
496496
AsyncInfo->SyncType = AsyncInfoTy::SyncTy::BLOCKING;
497497

498-
if (const int Rc = AsyncInfo->synchronize())
498+
if (AsyncInfo->synchronize())
499499
FATAL_MESSAGE0(1, "Error while querying the async queue for completion.\n");
500500
// If there are device operations still pending, return immediately without
501501
// deallocating the handle and increase the current thread query count.

0 commit comments

Comments
 (0)