diff --git a/sycl-jit/jit-compiler/lib/helper/ErrorHelper.h b/sycl-jit/jit-compiler/lib/helper/ErrorHelper.h index 20c7bcf5845f2..97e955321fa1d 100644 --- a/sycl-jit/jit-compiler/lib/helper/ErrorHelper.h +++ b/sycl-jit/jit-compiler/lib/helper/ErrorHelper.h @@ -16,7 +16,7 @@ namespace jit_compiler { std::string formatError(llvm::Error &&Err, const std::string &Msg); template -static ResultType errorTo(llvm::Error &&Err, const std::string &Msg, +[[maybe_unused]] static ResultType errorTo(llvm::Error &&Err, const std::string &Msg, ExtraArgTypes... ExtraArgs) { // Cannot throw an exception here if LLVM itself is compiled without exception // support.