Skip to content

Commit b89e774

Browse files
authored
[win/asan] Avoid warnings in compiling interception_win_test.cpp. (llvm#116887)
Example: warning: unused variable 'kPatchableCode12' [-Wunused-const-variable]
1 parent decb874 commit b89e774

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler-rt/lib/interception/tests/interception_win_test.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ const u8 kUnpatchableCode6[] = {
230230
0x90, 0x90, 0x90, 0x90,
231231
};
232232

233+
# if SANITIZER_WINDOWS64
233234
const u8 kUnpatchableCode7[] = {
234235
0x33, 0xc0, // xor eax,eax
235236
0x48, 0x85, 0xd2, // test rdx,rdx
@@ -286,7 +287,9 @@ const u8 kPatchableCode11[] = {
286287
0x48, 0x83, 0xec, 0x38, // sub rsp,38h
287288
0x83, 0x64, 0x24, 0x28, 0x00, // and dword ptr [rsp+28h],0
288289
};
290+
# endif
289291

292+
# if !SANITIZER_WINDOWS64
290293
const u8 kPatchableCode12[] = {
291294
0x55, // push ebp
292295
0x53, // push ebx
@@ -302,6 +305,7 @@ const u8 kPatchableCode13[] = {
302305
0x56, // push esi
303306
0x8b, 0x5c, 0x24, 0x14, // mov ebx,dword ptr[esp+14h]
304307
};
308+
# endif
305309

306310
const u8 kPatchableCode14[] = {
307311
0x55, // push ebp

0 commit comments

Comments
 (0)