[llvm] Fix uninitialized variable (PR #89040)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 17 02:17:58 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-directx

Author: Isha Agarwal (iagarwa)

<details>
<summary>Changes</summary>

Fix uninitialized scalar field

---
Full diff: https://github.com/llvm/llvm-project/pull/89040.diff


1 Files Affected:

- (modified) llvm/include/llvm/BinaryFormat/DXContainer.h (+1-1) 


``````````diff
diff --git a/llvm/include/llvm/BinaryFormat/DXContainer.h b/llvm/include/llvm/BinaryFormat/DXContainer.h
index e8d03f806715f1..7ef858d0b393b6 100644
--- a/llvm/include/llvm/BinaryFormat/DXContainer.h
+++ b/llvm/include/llvm/BinaryFormat/DXContainer.h
@@ -427,7 +427,7 @@ struct ResourceBindInfo : public v0::ResourceBindInfo {
 
 namespace v3 {
 struct RuntimeInfo : public v2::RuntimeInfo {
-  uint32_t EntryNameOffset;
+  uint32_t EntryNameOffset = 0;
 
   void swapBytes() {
     v2::RuntimeInfo::swapBytes();

``````````

</details>


https://github.com/llvm/llvm-project/pull/89040


More information about the llvm-commits mailing list