Skip to content

Commit c8667f5

Browse files
[SYCL][NFC] Avoid unused variable AccTarget (#18675)
After #18437, the runtime library is producing a warning about an unused variable AccTarget in handler.cpp. This is due to the variable only being used in assert, which may in turn be removed when assertions are disabled. This commit removes the variable in favor of making the conversion inside the assert. Signed-off-by: Larsen, Steffen <[email protected]>
1 parent f063fea commit c8667f5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sycl/source/handler.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,10 +1234,9 @@ void handler::extractArgsAndReqsFromLambda(
12341234
} else if (Kind == detail::kernel_param_kind_t::kind_dynamic_accessor) {
12351235
// For args kind of accessor Size is information about accessor.
12361236
// The first 11 bits of Size encodes the accessor target.
1237-
const access::target AccTarget =
1238-
static_cast<access::target>(Size & AccessTargetMask);
12391237
// Only local targets are supported for dynamic accessors.
1240-
assert(AccTarget == access::target::local);
1238+
assert(static_cast<access::target>(Size & AccessTargetMask) ==
1239+
access::target::local);
12411240

12421241
ext::oneapi::experimental::detail::dynamic_parameter_base
12431242
*DynamicParamBase = static_cast<

0 commit comments

Comments
 (0)