Merge "Disable -Wcast-function-type-mismatch" into main am: 4283de9c57
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3514831
Change-Id: Ib0752a488a18c36561dd4b93898288676bccf7a5
Signed-off-by: Automerger Merge Worker <[email protected]>
diff --git a/tests/pty_test.cpp b/tests/pty_test.cpp
index d5d8994..6e3d2c7 100644
--- a/tests/pty_test.cpp
+++ b/tests/pty_test.cpp
@@ -103,6 +103,8 @@
arg->finished = true;
}
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wcast-function-type-mismatch"
TEST(pty, bug_28979140) {
// This test is to test a kernel bug, which uses a lock free ring-buffer to
// pass data through a raw pty, but missing necessary memory barriers.
@@ -164,3 +166,4 @@
ASSERT_TRUE(arg.matched);
close(pty);
}
+#pragma clang diagnostic pop
\ No newline at end of file
diff --git a/tests/stdio_ext_test.cpp b/tests/stdio_ext_test.cpp
index dce1a66..56483f5 100644
--- a/tests/stdio_ext_test.cpp
+++ b/tests/stdio_ext_test.cpp
@@ -241,6 +241,8 @@
funlockfile(stdout);
}
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wcast-function-type-mismatch"
TEST(stdio_ext, __fsetlocking_BYCALLER) {
// Check if users can use flockfile/funlockfile to protect stdio operations.
int old_state = __fsetlocking(stdout, FSETLOCKING_BYCALLER);
@@ -255,3 +257,4 @@
ASSERT_EQ(0, pthread_join(thread, nullptr));
__fsetlocking(stdout, old_state);
}
+#pragma clang diagnostic pop