From 42bca4b0aa25a9b2c7dc462a1f6fabd8dca61935 Mon Sep 17 00:00:00 2001 From: Bing1 Yu Date: Fri, 6 May 2022 16:16:40 +0800 Subject: [PATCH] [SYCL] Cast some unused variable as void in bfloat16.hpp --- sycl/include/sycl/ext/oneapi/experimental/bfloat16.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sycl/include/sycl/ext/oneapi/experimental/bfloat16.hpp b/sycl/include/sycl/ext/oneapi/experimental/bfloat16.hpp index 1190c80631928..39bad8d1ecc35 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/bfloat16.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/bfloat16.hpp @@ -35,6 +35,7 @@ class bfloat16 { return __spirv_ConvertFToBF16INTEL(a); #endif #else + (void)a; throw exception{errc::feature_not_supported, "Bfloat16 conversion is not supported on host device"}; #endif @@ -50,6 +51,7 @@ class bfloat16 { return __spirv_ConvertBF16ToFINTEL(a); #endif #else + (void)a; throw exception{errc::feature_not_supported, "Bfloat16 conversion is not supported on host device"}; #endif @@ -88,6 +90,7 @@ class bfloat16 { return bfloat16{-__spirv_ConvertBF16ToFINTEL(lhs.value)}; #endif #else + (void)lhs; throw exception{errc::feature_not_supported, "Bfloat16 unary minus is not supported on host device"}; #endif