Skip to content

Commit be3a685

Browse files
committed
[SYCL] Mark variable as maybe_unused
If assertions are disabled this warning is treated as an error: warning C4101: 'e': unreferenced local variable
1 parent 16a14c9 commit be3a685

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sycl/include/sycl/detail/common.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ static constexpr std::array<T, N> RepeatValue(const T &Arg) {
371371
assert(false); \
372372
}
373373
#else
374-
#define __SYCL_REPORT_EXCEPTION_TO_STREAM(str, e)
374+
#define __SYCL_REPORT_EXCEPTION_TO_STREAM(str, [[maybe_unused]] e)
375375
#endif
376376

377377
// Tag to help create CTAD definition to avoid ctad-maybe-unsupported warning

0 commit comments

Comments
 (0)