Skip to content

Commit bd99f58

Browse files
fix potential warnings
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
1 parent c270827 commit bd99f58

File tree

2 files changed

+7
-16
lines changed

2 files changed

+7
-16
lines changed

sycl/source/detail/graph_impl.cpp

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -309,19 +309,10 @@ static void checkGraphPropertiesAndThrow(const property_list &Properties) {
309309
return false;
310310
}
311311
};
312-
auto CheckPropertiesWithData = [](int PropertyKind) {
313-
#define __SYCL_DATA_LESS_PROP(NS_QUALIFIER, PROP_NAME, ENUM_VAL)
314-
#define __SYCL_MANUALLY_DEFINED_PROP(NS_QUALIFIER, PROP_NAME) \
315-
case NS_QUALIFIER::PROP_NAME::getKind(): \
316-
return true;
317-
switch (PropertyKind) {
318-
#include <sycl/ext/oneapi/experimental/detail/properties/graph_properties.def>
319-
default:
320-
return false;
321-
}
322-
};
312+
// No properties with data for graph now.
313+
auto NoAllowedPropertiesCheck = [](int) { return false; };
323314
sycl::detail::PropertyValidator::checkPropsAndThrow(
324-
Properties, CheckDataLessProperties, CheckPropertiesWithData);
315+
Properties, CheckDataLessProperties, NoAllowedPropertiesCheck);
325316
}
326317

327318
graph_impl::graph_impl(const sycl::context &SyclContext,

sycl/source/detail/program_manager/program_manager.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2335,7 +2335,7 @@ ProgramManager::compile(const device_image_plain &DeviceImage,
23352335
const std::vector<device> &Devs,
23362336
const property_list &PropList) {
23372337
{
2338-
auto NoAllowedPropertiesCheck = [](int PropertyKind) { return false; };
2338+
auto NoAllowedPropertiesCheck = [](int) { return false; };
23392339
detail::PropertyValidator::checkPropsAndThrow(
23402340
PropList, NoAllowedPropertiesCheck, NoAllowedPropertiesCheck);
23412341
}
@@ -2405,7 +2405,7 @@ ProgramManager::link(const device_image_plain &DeviceImage,
24052405
const std::vector<device> &Devs,
24062406
const property_list &PropList) {
24072407
{
2408-
auto NoAllowedPropertiesCheck = [](int PropertyKind) { return false; };
2408+
auto NoAllowedPropertiesCheck = [](int) { return false; };
24092409
detail::PropertyValidator::checkPropsAndThrow(
24102410
PropList, NoAllowedPropertiesCheck, NoAllowedPropertiesCheck);
24112411
}
@@ -2526,7 +2526,7 @@ device_image_plain ProgramManager::build(const device_image_plain &DeviceImage,
25262526
const std::vector<device> &Devs,
25272527
const property_list &PropList) {
25282528
{
2529-
auto NoAllowedPropertiesCheck = [](int PropertyKind) { return false; };
2529+
auto NoAllowedPropertiesCheck = [](int) { return false; };
25302530
detail::PropertyValidator::checkPropsAndThrow(
25312531
PropList, NoAllowedPropertiesCheck, NoAllowedPropertiesCheck);
25322532
}
@@ -2691,7 +2691,7 @@ ProgramManager::getOrCreateKernel(const context &Context,
26912691
ur_program_handle_t Program) {
26922692

26932693
{
2694-
auto NoAllowedPropertiesCheck = [](int PropertyKind) { return false; };
2694+
auto NoAllowedPropertiesCheck = [](int) { return false; };
26952695
detail::PropertyValidator::checkPropsAndThrow(
26962696
PropList, NoAllowedPropertiesCheck, NoAllowedPropertiesCheck);
26972697
}

0 commit comments

Comments
 (0)