[PATCH] D75085: Fix unused-variable warning

Brian Cain via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 24 14:57:07 PST 2020


bcain created this revision.
bcain added a reviewer: ilya-biryukov.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75085

Files:
  llvm/lib/Support/FileUtilities.cpp


Index: llvm/lib/Support/FileUtilities.cpp
===================================================================
--- llvm/lib/Support/FileUtilities.cpp
+++ llvm/lib/Support/FileUtilities.cpp
@@ -318,9 +318,8 @@
         atomic_write_error::output_stream_error);
   }
 
-  if (const std::error_code Error =
-          sys::fs::rename(/*from=*/GeneratedUniqPath.c_str(),
-                          /*to=*/FinalPath.str().c_str())) {
+  if (sys::fs::rename(/*from=*/GeneratedUniqPath.c_str(),
+                      /*to=*/FinalPath.str().c_str())) {
     return llvm::make_error<AtomicFileWriteError>(
         atomic_write_error::failed_to_rename_temp_file);
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75085.246317.patch
Type: text/x-patch
Size: 660 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200224/9cc639ab/attachment.bin>


More information about the llvm-commits mailing list