[PATCH] D71119: [NFC][AIX][XCOFF] fixed compile warning on the strncpy.
Hubert Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 13 19:33:28 PST 2019
hubert.reinterpretcast added inline comments.
================
Comment at: llvm/lib/MC/XCOFFObjectWriter.cpp:419
} else {
- char Name[XCOFF::NameSize];
+ char Name[XCOFF::NameSize+1];
std::strncpy(Name, SymbolName.data(), XCOFF::NameSize);
----------------
@DiggerLin, please add a comment that the buffer size is adjusted to avoid a false-positive compiler warning.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71119/new/
https://reviews.llvm.org/D71119
More information about the llvm-commits
mailing list