Page MenuHomePhabricator

[PseudoTerminal][NFC] Use llvm errno helpers
ClosedPublic

Authored by xbolva00 on Sep 3 2018, 5:49 AM.

Details

Summary

LLVM provide (str)errno helpers, so convert code to use it.

Also fixes warning:
/home/xbolva00/LLVM/llvm/tools/lldb/source/Host/common/PseudoTerminal.cpp:248:25: warning: ignoring return value of ‘char* strerror_r(int, char*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]

::strerror_r(errno, error_str, error_len);

Diff Detail

Event Timeline

xbolva00 created this revision.Sep 3 2018, 5:49 AM
xbolva00 updated this revision to Diff 163705.Sep 3 2018, 6:02 AM
  • Moved variable into #if block
xbolva00 updated this revision to Diff 163706.Sep 3 2018, 6:09 AM
  • Removed include errno.h
xbolva00 retitled this revision from [PseudoTerminal] Use llvm errno helpers to [PseudoTerminal][NFC] Use llvm errno helpers.Sep 3 2018, 6:23 AM

Any chance we could wrap this in a helper function?

xbolva00 updated this revision to Diff 163712.Sep 3 2018, 7:02 AM
  • Added helper function
JDevlieghere accepted this revision.Sep 3 2018, 7:40 AM

LGTM, thx!

This revision is now accepted and ready to land.Sep 3 2018, 7:40 AM
xbolva00 closed this revision.Sep 3 2018, 8:00 AM