[PATCH] D94872: [NFC][AIX][XCOFF] Fix compile warning on strncpy

Yang Fan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 16 22:51:36 PST 2021


nullptr.cpp updated this revision to Diff 317209.
nullptr.cpp added a comment.

rebase


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94872/new/

https://reviews.llvm.org/D94872

Files:
  llvm/lib/MC/XCOFFObjectWriter.cpp


Index: llvm/lib/MC/XCOFFObjectWriter.cpp
===================================================================
--- llvm/lib/MC/XCOFFObjectWriter.cpp
+++ llvm/lib/MC/XCOFFObjectWriter.cpp
@@ -99,7 +99,7 @@
 // stored separately, e.g. the .data section containing read-write, descriptor,
 // TOCBase and TOC-entry csects.
 struct Section {
-  char Name[XCOFF::NameSize];
+  char Name[XCOFF::NameSize + 1];
   // The physical/virtual address of the section. For an object file
   // these values are equivalent.
   uint32_t Address;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94872.317209.patch
Type: text/x-patch
Size: 528 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210117/fa76d83d/attachment.bin>


More information about the llvm-commits mailing list