Nullability check for shm module.
Bugs: b/245972273
Test: adb shell
Change-Id: I9bdd5727719311d063fa126fc286618e9d24a45b
diff --git a/tests/sys_shm_test.cpp b/tests/sys_shm_test.cpp
index fd5d424..65f9eba 100644
--- a/tests/sys_shm_test.cpp
+++ b/tests/sys_shm_test.cpp
@@ -73,9 +73,12 @@
}
TEST(sys_shm, shmdt_failure) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnonnull"
errno = 0;
ASSERT_EQ(-1, shmdt(nullptr));
ASSERT_TRUE(errno == EINVAL || errno == ENOSYS);
+#pragma clang diagnostic pop
}
TEST(sys_shm, shmget_failure) {