Skip to content

Commit fb09533

Browse files
KseniyaTikhomirovaFreddyLeaf
authored andcommitted
[SYCL][XPTI][NFC] Fix compiler warnings introduced by #8101 (#8598)
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
1 parent 9b0c0c7 commit fb09533

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

sycl/source/detail/scheduler/commands.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -935,9 +935,9 @@ void Command::copySubmissionCodeLocation() {
935935
detail::tls_code_loc_t Tls;
936936
auto TData = Tls.query();
937937
if (TData.fileName())
938-
MSubmissionFileName = {TData.fileName()};
938+
MSubmissionFileName = TData.fileName();
939939
if (TData.functionName())
940-
MSubmissionFunctionName = {TData.functionName()};
940+
MSubmissionFunctionName = TData.functionName();
941941
if (MSubmissionFileName.size() || MSubmissionFunctionName.size())
942942
MSubmissionCodeLocation = {
943943
MSubmissionFileName.c_str(), MSubmissionFunctionName.c_str(),

sycl/unittests/xpti_trace/QueueApiFailures.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ TEST_F(QueueApiFailures, QueueSubmit) {
106106
},
107107
TestCodeLocation);
108108
} catch (sycl::exception &e) {
109+
std::ignore = e;
109110
ExceptionCaught = true;
110111
}
111112
Q.wait();
@@ -128,6 +129,7 @@ TEST_F(QueueApiFailures, QueueSingleTask) {
128129
try {
129130
Q.single_task<TestKernel<KernelSize>>([=]() {}, TestCodeLocation);
130131
} catch (sycl::exception &e) {
132+
std::ignore = e;
131133
ExceptionCaught = true;
132134
}
133135
Q.wait();
@@ -159,6 +161,7 @@ TEST_F(QueueApiFailures, QueueMemset) {
159161
try {
160162
Q.memset(HostAlloc, 42, 1);
161163
} catch (sycl::exception &e) {
164+
std::ignore = e;
162165
ExceptionCaught = true;
163166
}
164167
Q.wait();
@@ -193,6 +196,7 @@ TEST_F(QueueApiFailures, QueueMemcpy) {
193196
try {
194197
Q.memcpy(HostAllocDst, HostAllocSrc, 1);
195198
} catch (sycl::exception &e) {
199+
std::ignore = e;
196200
ExceptionCaught = true;
197201
}
198202
Q.wait();
@@ -219,6 +223,7 @@ TEST_F(QueueApiFailures, QueueCopy) {
219223
try {
220224
Q.copy(HostAllocDst, HostAllocSrc, 1, TestCodeLocation);
221225
} catch (sycl::exception &e) {
226+
std::ignore = e;
222227
ExceptionCaught = true;
223228
}
224229
Q.wait();
@@ -253,6 +258,7 @@ TEST_F(QueueApiFailures, QueueFill) {
253258
try {
254259
Q.fill(HostAlloc, 42, 1);
255260
} catch (sycl::exception &e) {
261+
std::ignore = e;
256262
ExceptionCaught = true;
257263
}
258264
Q.wait();
@@ -286,6 +292,7 @@ TEST_F(QueueApiFailures, QueuePrefetch) {
286292
try {
287293
Q.prefetch(HostAlloc, 2);
288294
} catch (sycl::exception &e) {
295+
std::ignore = e;
289296
ExceptionCaught = true;
290297
}
291298
Q.wait();
@@ -317,6 +324,7 @@ TEST_F(QueueApiFailures, QueueMemAdvise) {
317324
try {
318325
Q.mem_advise(HostAlloc, 1, 0 /*default*/);
319326
} catch (sycl::exception &e) {
327+
std::ignore = e;
320328
ExceptionCaught = true;
321329
}
322330
Q.wait();
@@ -341,6 +349,7 @@ TEST_F(QueueApiFailures, QueueParallelFor) {
341349
try {
342350
Q.parallel_for<TestKernel<KernelSize>>(globalWIs, [=](sycl::id<1> idx) {});
343351
} catch (sycl::exception &e) {
352+
std::ignore = e;
344353
ExceptionCaught = true;
345354
}
346355
Q.wait();
@@ -373,6 +382,7 @@ TEST_F(QueueApiFailures, QueueHostTaskWaitFail) {
373382
EventToDepend =
374383
Q.single_task<TestKernel<KernelSize>>([=]() {}, TestCodeLocation);
375384
} catch (sycl::exception &e) {
385+
std::ignore = e;
376386
ExceptionCaught = true;
377387
}
378388
EXPECT_FALSE(ExceptionCaught);
@@ -386,6 +396,7 @@ TEST_F(QueueApiFailures, QueueHostTaskWaitFail) {
386396
},
387397
ExtraTestCodeLocation);
388398
} catch (sycl::exception &e) {
399+
std::ignore = e;
389400
ExceptionCaught = true;
390401
}
391402
EXPECT_FALSE(ExceptionCaught);
@@ -412,6 +423,7 @@ TEST_F(QueueApiFailures, QueueHostTaskFail) {
412423
EventToDepend =
413424
Q.single_task<TestKernel<KernelSize>>([=]() {}, TestCodeLocation);
414425
} catch (sycl::exception &e) {
426+
std::ignore = e;
415427
ExceptionCaught = true;
416428
}
417429
EXPECT_FALSE(ExceptionCaught);
@@ -429,6 +441,7 @@ TEST_F(QueueApiFailures, QueueHostTaskFail) {
429441
},
430442
ExtraTestCodeLocation);
431443
} catch (sycl::exception &e) {
444+
std::ignore = e;
432445
ExceptionCaught = true;
433446
}
434447
EXPECT_FALSE(ExceptionCaught);
@@ -469,6 +482,7 @@ TEST_F(QueueApiFailures, QueueKernelAsync) {
469482
},
470483
TestCodeLocation);
471484
} catch (sycl::exception &e) {
485+
std::ignore = e;
472486
ExceptionCaught = true;
473487
}
474488
EXPECT_FALSE(ExceptionCaught);
@@ -480,6 +494,7 @@ TEST_F(QueueApiFailures, QueueKernelAsync) {
480494
},
481495
ExtraTestCodeLocation);
482496
} catch (sycl::exception &e) {
497+
std::ignore = e;
483498
ExceptionCaught = true;
484499
}
485500
EXPECT_FALSE(ExceptionCaught);

0 commit comments

Comments
 (0)