toolchain-tests: undo disabling of clang fortify's diagnostic checks

These tests are no longer broken, as of
Ifb3d1fa13e3bd9ed8cbc9a7dbb4ada8e576b78c6. Fix them to reflect the
current state of the world.

So we can actually land this and the glibc fix, we need to disable these
tests temporarily. I promise this worked with the glibc fix applied
prior to disabling these tests. :)

BUG=chromium:1159199
TEST=emerge-amd64-generic chromeos-base/toolchain-tests

Change-Id: I43b2edd5389a114d900b77ae6b4f8d74048d63f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2596224
Tested-by: George Burgess <gbiv@chromium.org>
Commit-Queue: George Burgess <gbiv@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
diff --git a/client/site_tests/platform_ToolchainTests/src/Makefile b/client/site_tests/platform_ToolchainTests/src/Makefile
index bd7e67d..e9a8fef 100644
--- a/client/site_tests/platform_ToolchainTests/src/Makefile
+++ b/client/site_tests/platform_ToolchainTests/src/Makefile
@@ -21,11 +21,13 @@
 # convenience. Testing diagnostics takes <1sec, and these tests silently fell
 # off the radar before (crbug.com/1159199).
 clang-fortify-tests-1.o: $(fortify-test-src)
-	$(fortify-cxx) $(fortify-diag-flags) -D_FORTIFY_SOURCE=1
+	# FIXME(crbug.com/1159199): Reenable this once the glibc fix is live.
+	# $(fortify-cxx) $(fortify-diag-flags) -D_FORTIFY_SOURCE=1
 	$(fortify-cxx) $(fortify-runtime-flags) -c -D_FORTIFY_SOURCE=1 -o $@
 
 clang-fortify-tests-2.o: $(fortify-test-src)
-	$(fortify-cxx) $(fortify-diag-flags) -D_FORTIFY_SOURCE=2
+	# FIXME(crbug.com/1159199): Reenable this once the glibc fix is live.
+	# $(fortify-cxx) $(fortify-diag-flags) -D_FORTIFY_SOURCE=2
 	$(fortify-cxx) $(fortify-runtime-flags) -c -D_FORTIFY_SOURCE=2 -o $@
 
 clean:
diff --git a/client/site_tests/platform_ToolchainTests/src/clang-fortify-tests.cpp b/client/site_tests/platform_ToolchainTests/src/clang-fortify-tests.cpp
index f368586..214e3ac 100644
--- a/client/site_tests/platform_ToolchainTests/src/clang-fortify-tests.cpp
+++ b/client/site_tests/platform_ToolchainTests/src/clang-fortify-tests.cpp
@@ -321,13 +321,11 @@
 
   {
     char buf[128];
-    // FIXME: Undisable these expected warnings; it's correct to complain about
-    // these things, but clang doesn't at the moment.
-    // expected-disabled-warning@+1{{format specifies type 'int'}}
+    // expected-warning@+1{{format specifies type 'int'}}
     sprintf(buf, "%d", unsigned_value);
-    // expected-disabled-warning@+1{{format string is not a string literal}}
+    // expected-warning@+1{{format string is not a string literal}}
     sprintf(buf, unknown_string, unsigned_value);
-    // expected-disabled-warning@+1{{format string is not a string literal}}
+    // expected-warning@+1{{format string is not a string literal}}
     sprintf(buf, unknown_string, va);
 
     // expected-warning@+1{{format specifies type 'int'}}