-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Fix a -Wunused-variable
warning on windows
#157973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The `UID` variable is only being used inside the `#ifndef _WIN32` block - move the definition into the block as well.
@llvm/pr-subscribers-llvm-support Author: Justin Bogner (bogner) ChangesThe Full diff: https://github.com/llvm/llvm-project/pull/157973.diff 1 Files Affected:
diff --git a/llvm/unittests/Support/VirtualOutputBackendsTest.cpp b/llvm/unittests/Support/VirtualOutputBackendsTest.cpp
index 3aee880a377df..03a4a9c3c7c32 100644
--- a/llvm/unittests/Support/VirtualOutputBackendsTest.cpp
+++ b/llvm/unittests/Support/VirtualOutputBackendsTest.cpp
@@ -559,9 +559,9 @@ Error OnDiskOutputBackendProvider::checkKept(StringRef FilePath,
if (Error E = lookupFileInfo(FilePath, Info))
return E;
+#ifndef _WIN32
sys::fs::UniqueID UID =
shouldUseTemporaries(*Info) ? *Info->TempUID : *Info->UID;
-#ifndef _WIN32
if (!Info->F->hasUniqueID(UID))
return createStringError(inconvertibleErrorCode(),
"File not created by keep or changed UID");
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/22470 Here is the relevant piece of the build log for the reference
|
The
UID
variable is only being used inside the#ifndef _WIN32
block - move the definition into the block as well.