Page MenuHomePhabricator

[NFC][AIX][XCOFF] fixed compile warning on the strncpy.

Authored by DiggerLin on Dec 6 2019, 7:22 AM.



There is warning when compile the file XCOFFObjectWriter.cpp
/srv/llvm-buildbot-srcatch/llvm-build-dir/openmp-gcc-x86_64-linux-debian/llvm.src/llvm/lib/MC/XCOFFObjectWriter.cpp:414:17: warning: 'char* strncpy(char*, const char*, size_t)' specified bound 8 equals destination size [-Wstringop-truncation]

the patch fixed the warning.

Diff Detail

Event Timeline

DiggerLin created this revision.Dec 6 2019, 7:22 AM
Herald added a project: Restricted Project. · View Herald Transcript
daltenty accepted this revision.Dec 6 2019, 7:47 AM

LGTM (previous discussion in D70859)

This revision is now accepted and ready to land.Dec 6 2019, 7:47 AM
This revision was automatically updated to reflect the committed changes.

@DiggerLin, please add a comment that the buffer size is adjusted to avoid a false-positive compiler warning.