Skip to content

Commit 979c38c

Browse files
committed
[compiler-rt] [windows] Add UNUSED attributes on variables/functions only used for 64 bit targets
This fixes warnings when building for 32 bit targets. Differential Revision: https://reviews.llvm.org/D91852
1 parent 854b861 commit 979c38c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler-rt/lib/interception/interception_win.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ namespace __interception {
136136
static const int kAddressLength = FIRST_32_SECOND_64(4, 8);
137137
static const int kJumpInstructionLength = 5;
138138
static const int kShortJumpInstructionLength = 2;
139-
static const int kIndirectJumpInstructionLength = 6;
139+
UNUSED static const int kIndirectJumpInstructionLength = 6;
140140
static const int kBranchLength =
141141
FIRST_32_SECOND_64(kJumpInstructionLength, kIndirectJumpInstructionLength);
142142
static const int kDirectBranchLength = kBranchLength + kAddressLength;
@@ -165,7 +165,7 @@ static uptr GetMmapGranularity() {
165165
return si.dwAllocationGranularity;
166166
}
167167

168-
static uptr RoundUpTo(uptr size, uptr boundary) {
168+
UNUSED static uptr RoundUpTo(uptr size, uptr boundary) {
169169
return (size + boundary - 1) & ~(boundary - 1);
170170
}
171171

@@ -309,7 +309,7 @@ struct TrampolineMemoryRegion {
309309
uptr max_size;
310310
};
311311

312-
static const uptr kTrampolineScanLimitRange = 1 << 31; // 2 gig
312+
UNUSED static const uptr kTrampolineScanLimitRange = 1 << 31; // 2 gig
313313
static const int kMaxTrampolineRegion = 1024;
314314
static TrampolineMemoryRegion TrampolineRegions[kMaxTrampolineRegion];
315315

0 commit comments

Comments
 (0)