From c189f49c30d55e00136c1cd92c60446426b9e09e Mon Sep 17 00:00:00 2001 From: Udit Kumar Agarwal Date: Fri, 3 Jan 2025 10:42:19 -0800 Subject: [PATCH 1/2] Fix `unused_function` error in post-commit Failure: https://github.com/intel/llvm/actions/runs/12601531257/job/35122811530#step:12:83 --- sycl/source/detail/os_util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/source/detail/os_util.cpp b/sycl/source/detail/os_util.cpp index 427da3c7ffcff..a6753c1ad4a51 100644 --- a/sycl/source/detail/os_util.cpp +++ b/sycl/source/detail/os_util.cpp @@ -58,7 +58,7 @@ namespace sycl { inline namespace _V1 { namespace detail { -#if defined(__INTEL_PREVIEW_BREAKING_CHANGES) +#if defined(__INTEL_PREVIEW_BREAKING_CHANGES) && defined(__SYCL_RT_OS_LINUX) static std::string getDirName(const char *Path) #else std::string OSUtil::getDirName(const char *Path) From 081ada11a684cdf7bb05eaa9f63f7b6007bd930c Mon Sep 17 00:00:00 2001 From: Udit Kumar Agarwal Date: Fri, 3 Jan 2025 11:25:47 -0800 Subject: [PATCH 2/2] Use [[maybe_unused]] instead --- sycl/source/detail/os_util.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/source/detail/os_util.cpp b/sycl/source/detail/os_util.cpp index a6753c1ad4a51..05711f2d6c1d9 100644 --- a/sycl/source/detail/os_util.cpp +++ b/sycl/source/detail/os_util.cpp @@ -58,8 +58,8 @@ namespace sycl { inline namespace _V1 { namespace detail { -#if defined(__INTEL_PREVIEW_BREAKING_CHANGES) && defined(__SYCL_RT_OS_LINUX) -static std::string getDirName(const char *Path) +#if defined(__INTEL_PREVIEW_BREAKING_CHANGES) +[[maybe_unused]] static std::string getDirName(const char *Path) #else std::string OSUtil::getDirName(const char *Path) #endif