Skip to content

Commit 7057b3c

Browse files
authored
Use [[maybe_unused]] to get rid of warnings while building SPIRVRunner (#2829)
Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 213eb5e commit 7057b3c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

third_party/intel/backend/include/sycl_functions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ create_function(ze_module_handle_t module, std::string_view func_name) {
135135

136136
void printModuleKernelName(ze_module_handle_t hModule) {
137137
uint32_t Count = 0;
138-
auto ret = zeModuleGetKernelNames(hModule, &Count, nullptr);
138+
[[maybe_unused]] auto ret = zeModuleGetKernelNames(hModule, &Count, nullptr);
139139
assert(ret == ZE_RESULT_SUCCESS);
140140
std::unique_ptr<const char *[]> PNames(new const char *[Count]);
141141
ret = zeModuleGetKernelNames(hModule, &Count, PNames.get());

utils/SPIRVRunner/SPIRVRunner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static void sycl_kernel_launch(sycl::queue &stream, sycl::kernel &kernel_ptr,
268268
std::string kernel_name =
269269
kernel_ptr.get_info<sycl::info::kernel::function_name>();
270270

271-
uint32_t expected_num_params =
271+
[[maybe_unused]] uint32_t expected_num_params =
272272
kernel_ptr.get_info<sycl::info::kernel::num_args>();
273273

274274
size_t global_range_x =

0 commit comments

Comments
 (0)