Skip to content

Commit 1d3e887

Browse files
fix warnings #42 and #50
1 parent 6d434f6 commit 1d3e887

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

backends/source/dppl_sycl_context_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ bool DPPLContext_AreEq (__dppl_keep const DPPLSyclContextRef CtxRef1,
4747

4848
bool DPPLContext_IsHost (__dppl_keep const DPPLSyclContextRef CtxRef)
4949
{
50-
auto Ctx = unwrap(CtxRef)
50+
auto Ctx = unwrap(CtxRef);
5151
if (Ctx) {
5252
return Ctx->is_host();
5353
}

backends/source/dppl_sycl_platform_interface.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,12 @@ size_t DPPLPlatform_GetNumNonHostPlatforms ()
148148

149149
size_t DPPLPlatform_GetNumNonHostBackends ()
150150
{
151-
return get_set_of_non_hostbackends().size();
151+
auto be_set = get_set_of_non_hostbackends();
152+
153+
if (be_set.empty())
154+
return 0;
155+
156+
return be_set.size();
152157
}
153158

154159
__dppl_give DPPLSyclBackendType *DPPLPlatform_GetListOfNonHostBackends ()

0 commit comments

Comments
 (0)