Skip to content

[SYCL][NFC] Fix warnings reported by Clang #3050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sycl/include/CL/sycl/INTEL/online_compiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ template <source_language Lang> class online_compiler {
// TODO: the initial version generates the generic code (SKL now), need
// to do additional device::info calls to determine the device by it's
// features.
online_compiler(const sycl::device &dev)
online_compiler(const sycl::device &)
: OutputFormat(compiled_code_format::spir_v), OutputFormatVersion({0, 0}),
DeviceType(sycl::info::device_type::all), DeviceArch(device_arch::any),
Is64Bit(true), DeviceStepping("") {}
Expand Down
1 change: 1 addition & 0 deletions sycl/plugins/level_zero/pi_level_zero.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5525,6 +5525,7 @@ pi_result piPluginInit(pi_plugin *PluginInit) {
// It can include all the jobs to tear down resources before
// the plugin is unloaded from memory.
pi_result piTearDown(void *PluginParameter) {
(void)PluginParameter;
// reclaim pi_platform objects here since we don't have piPlatformRelease.
for (pi_platform &Platform : *PiPlatformsCache) {
delete Platform;
Expand Down
5 changes: 4 additions & 1 deletion sycl/plugins/opencl/pi_opencl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,10 @@ pi_result piextProgramGetNativeHandle(pi_program program,
// This API is called by Sycl RT to notify the end of the plugin lifetime.
// TODO: add a global variable lifetime management code here (see
// pi_level_zero.cpp for reference) Currently this is just a NOOP.
pi_result piTearDown(void *PluginParameter) { return PI_SUCCESS; }
pi_result piTearDown(void *PluginParameter) {
(void)PluginParameter;
return PI_SUCCESS;
}

pi_result piPluginInit(pi_plugin *PluginInit) {
int CompareVersions = strcmp(PluginInit->PiVersion, SupportedVersion);
Expand Down
3 changes: 1 addition & 2 deletions sycl/source/detail/device_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,8 @@ static bool is_sycl_partition_property(info::partition_property PP) {
case info::partition_property::partition_by_counts:
case info::partition_property::partition_by_affinity_domain:
return true;
default:
return false;
}
return false;
}

// Specialization for partition properties, variable OpenCL return size
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/plugin_printers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void printArgs(Arg0 arg0, Args... args) {
}

template <typename T> struct printOut {
printOut(T val) {}
printOut(T) {}
}; // Do nothing

template <> struct printOut<PiEvent *> {
Expand Down