This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Replace sprintf with snprintf (NFC)
ClosedPublic

Authored by kastiglione on Mar 30 2023, 10:21 AM.

Details

Summary

On macOS, sprintf is deprecated, using snprintf is recommended instead.

Diff Detail

Event Timeline

kastiglione created this revision.Mar 30 2023, 10:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2023, 10:21 AM
kastiglione requested review of this revision.Mar 30 2023, 10:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2023, 10:21 AM

This looks fine, but I wonder if using llvm::formatv wouldn't make this a whole lot easier?

That may be better, I don't really know. I would prefer to merge this as is (and leave a printf->formatv migration for another time).

This revision is now accepted and ready to land.Mar 30 2023, 12:12 PM
This revision was automatically updated to reflect the committed changes.