From fcf44debbc79b530697b69b7eb7bd3aa84a613e0 Mon Sep 17 00:00:00 2001 From: "Larsen, Steffen" Date: Tue, 21 Oct 2025 22:05:54 -0700 Subject: [PATCH] [SYCL RTC][NFC] Initialize StrLen variable This commit adds an initialization to the StrLen variable in the auto_pch_key read function. This should avoid a warnings - turning error in RHEL - about potentially uninitialized variables, despite it being set by readInteger. Signed-off-by: Larsen, Steffen --- sycl-jit/jit-compiler/lib/rtc/DeviceCompilation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl-jit/jit-compiler/lib/rtc/DeviceCompilation.cpp b/sycl-jit/jit-compiler/lib/rtc/DeviceCompilation.cpp index c6020eb9a4ca4..09177100a3941 100644 --- a/sycl-jit/jit-compiler/lib/rtc/DeviceCompilation.cpp +++ b/sycl-jit/jit-compiler/lib/rtc/DeviceCompilation.cpp @@ -117,7 +117,7 @@ struct auto_pch_key { Error read(llvm::BinaryStreamReader &Reader) { (void)AutoPCHError::ID; auto ReadStr = [&](std::string &Out) -> Error { - std::string::size_type StrLen; + std::string::size_type StrLen = 0; if (auto Err = Reader.readInteger(StrLen)) return Err;