Skip to content

Commit 9641399

Browse files
authored
Fix a -Wunused-variable warning on windows (llvm#157973)
The `UID` variable is only being used inside the `#ifndef _WIN32` block - move the definition into the block as well.
1 parent 4eadb45 commit 9641399

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/unittests/Support/VirtualOutputBackendsTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,9 +559,9 @@ Error OnDiskOutputBackendProvider::checkKept(StringRef FilePath,
559559
if (Error E = lookupFileInfo(FilePath, Info))
560560
return E;
561561

562+
#ifndef _WIN32
562563
sys::fs::UniqueID UID =
563564
shouldUseTemporaries(*Info) ? *Info->TempUID : *Info->UID;
564-
#ifndef _WIN32
565565
if (!Info->F->hasUniqueID(UID))
566566
return createStringError(inconvertibleErrorCode(),
567567
"File not created by keep or changed UID");

0 commit comments

Comments
 (0)