am 02ca0e31: Merge "Fix FORTIFY_SOURCE unittests."

* commit '02ca0e314219a4c7205a180a414c509651043f13':
  Fix FORTIFY_SOURCE unittests.
diff --git a/tests/fortify1_test_clang.cpp b/tests/fortify1_test_clang.cpp
index 2a1b8a7..0c0fb2b 100644
--- a/tests/fortify1_test_clang.cpp
+++ b/tests/fortify1_test_clang.cpp
@@ -289,10 +289,14 @@
 
 __BIONIC_FORTIFY_INLINE
 size_t test_fortify_inline(char* buf) {
-    return __bos(buf);
+  return __bos(buf);
 }
 
 TEST(Fortify1_Clang, fortify_inline) {
   char buf[1024];
-  ASSERT_EQ(test_fortify_inline(buf), sizeof(buf));
+  // no-op. Prints nothing. Needed to prevent the compiler
+  // from optimizing out buf.
+  buf[0] = '\0';
+  printf("%s", buf);
+  ASSERT_EQ(sizeof(buf), test_fortify_inline(buf));
 }
diff --git a/tests/fortify2_test_clang.cpp b/tests/fortify2_test_clang.cpp
index 2abf85a..d8a0ba6 100644
--- a/tests/fortify2_test_clang.cpp
+++ b/tests/fortify2_test_clang.cpp
@@ -162,10 +162,14 @@
 
 __BIONIC_FORTIFY_INLINE
 size_t test_fortify2_inline(char* buf) {
-    return __bos(buf);
+  return __bos(buf);
 }
 
 TEST(Fortify2_Clang, fortify_inline) {
   char buf[1024];
-  ASSERT_EQ(test_fortify2_inline(buf), sizeof(buf));
+  // no-op. Prints nothing. Needed to prevent the compiler
+  // from optimizing out buf.
+  buf[0] = '\0';
+  printf("%s", buf);
+  ASSERT_EQ(sizeof(buf), test_fortify2_inline(buf));
 }