diff options
| author | Treehugger Robot <treehugger-gerrit@google.com> | 2022-01-29 01:04:50 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2022-01-29 01:04:50 +0000 |
| commit | 650233457a75509f4b3fa2992e6618be10863bb7 (patch) | |
| tree | b6bf3d813a2a415b574406a14f46ccab09f379d0 /libc/malloc_hooks/tests/malloc_hooks_tests.cpp | |
| parent | f7e721cdc99ded867ea55b07e2b46e8b9b563f7d (diff) | |
| parent | 44dd9facb2f120914971b8f81126f1ca29044b71 (diff) | |
Merge "Silence -Wnon-power-of-two-alignment for a test"
Diffstat (limited to 'libc/malloc_hooks/tests/malloc_hooks_tests.cpp')
| -rw-r--r-- | libc/malloc_hooks/tests/malloc_hooks_tests.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libc/malloc_hooks/tests/malloc_hooks_tests.cpp b/libc/malloc_hooks/tests/malloc_hooks_tests.cpp index 18587819a..ca064c2fe 100644 --- a/libc/malloc_hooks/tests/malloc_hooks_tests.cpp +++ b/libc/malloc_hooks/tests/malloc_hooks_tests.cpp @@ -350,6 +350,9 @@ TEST_F(MallocHooksTest, aligned_alloc_hook_error) { RunTest("*.DISABLED_aligned_alloc_hook_error"); } +// Allow deliberate call with non-power-of-two alignment in test code. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnon-power-of-two-alignment" TEST_F(MallocHooksTest, DISABLED_aligned_alloc_hook_error) { Init(); ASSERT_TRUE(__memalign_hook != nullptr); @@ -365,6 +368,7 @@ TEST_F(MallocHooksTest, DISABLED_aligned_alloc_hook_error) { EXPECT_FALSE(void_arg_ != nullptr) << "The memalign hook was called with a nullptr with an error."; } +#pragma clang diagnostic pop #if !defined(__LP64__) TEST_F(MallocHooksTest, pvalloc_hook) { |
