From d9647594dee6fc0352845904f2249b7f1c4e2364 Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Thu, 5 Mar 2015 00:39:09 -0800 Subject: [PATCH] Fix fortify compilation test in x86_64. Change-Id: Ic243f6583e4f435899d01c7845dddacacbfc916e --- tests/fortify_sprintf_warnings.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/fortify_sprintf_warnings.cpp b/tests/fortify_sprintf_warnings.cpp index 341f48b02..537b341b9 100644 --- a/tests/fortify_sprintf_warnings.cpp +++ b/tests/fortify_sprintf_warnings.cpp @@ -144,7 +144,7 @@ void test_vsprintf(const char* fmt, ...) { va_start(va, fmt); // NOLINTNEXTLINE(whitespace/line_length) - // GCC: warning: call to int __builtin___vsprintf_chk(char*, int, {{(long )?}}unsigned int, const char*, {{(__va_list)|(void\*)|(char\*)}}) will always overflow destination buffer + // GCC: warning: call to int __builtin___vsprintf_chk(char*, int, {{(long )?}}unsigned int, const char*, {{(__va_list)|(void\*)|(char\*)|(__va_list_tag\*)}}) will always overflow destination buffer // clang should emit a warning, but doesn't vsprintf(buf, "foobar", va); va_end(va); @@ -156,7 +156,7 @@ void test_vsnprintf(const char* fmt, ...) { va_start(va, fmt); // NOLINTNEXTLINE(whitespace/line_length) - // GCC: warning: call to int __builtin___vsnprintf_chk(char*, {{(long )?}}unsigned int, int, {{(long )?}}unsigned int, const char*, {{(__va_list)|(void\*)|(char\*)}}) will always overflow destination buffer + // GCC: warning: call to int __builtin___vsnprintf_chk(char*, {{(long )?}}unsigned int, int, {{(long )?}}unsigned int, const char*, {{(__va_list)|(void\*)|(char\*)|(__va_list_tag\*)}}) will always overflow destination buffer // clang should emit a warning, but doesn't vsnprintf(buf, 5, "foobar", va); // NOLINT(runtime/printf)