Skip to content

Commit 105fc90

Browse files
committed
[LLD][MachO] Silence warning when building with MSVC
Silence the following warning with latest MSVC: ``` C:\git\llvm-project\lld\MachO\Driver.cpp(358): warning C4189: 't': local variable is initialized but not referenced ```
1 parent 69affe7 commit 105fc90

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lld/MachO/Driver.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,10 @@ void multiThreadedPageInBackground(DeferredFiles &deferred) {
354354

355355
// Reference all file's mmap'd pages to load them into memory.
356356
for (const char *page = buff.data(), *end = page + buff.size(); page < end;
357-
page += pageSize)
357+
page += pageSize) {
358358
LLVM_ATTRIBUTE_UNUSED volatile char t = *page;
359+
(void)t;
360+
}
359361
};
360362
#if LLVM_ENABLE_THREADS
361363
{ // Create scope for waiting for the taskGroup

0 commit comments

Comments
 (0)