[Lldb-commits] [PATCH] Fix warning about the use of mktemp and make platform agnostic by adding and using PipeBase::CreateWithUniqueName.

Robert Flack flackr at gmail.com
Wed Feb 4 14:49:57 PST 2015


REPOSITORY
  rL LLVM

================
Comment at: source/Host/posix/PipePosix.cpp:196
@@ +195,3 @@
+    llvm::SmallString<PATH_MAX> named_pipe_path;
+    llvm::SmallString<PATH_MAX> pipe_spec;
+    pipe_spec = prefix;
----------------
ovyalov wrote:
> Is it possible to combine all 3 statements of pipe_spec initialization? I mean, sth like this - const llvm::SmallString<PATH_MAX> pipe_spec (prefix + ".%%%%%%") ;
Ish:
llvm::SmallString<PATH_MAX> pipe_spec((prefix + ".%%%%%%").str());
Done.

================
Comment at: source/Host/posix/PipePosix.cpp:236
@@ -198,1 +235,3 @@
+    {
+        m_name = name;
         m_fds[READ] = fd;
----------------
ovyalov wrote:
> For the sake of consistency, please set the name within PipePosix::OpenAsWriterWithTimeout as well - before m_fds[WRITE] = fd;
No longer relevant, name is now returned as out param in CreateWithUniqueName.

http://reviews.llvm.org/D7348

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list