OSDN Git Service

Fix fortify compilation test on x86.
authorYabin Cui <yabinc@google.com>
Thu, 5 Mar 2015 06:35:13 +0000 (22:35 -0800)
committerYabin Cui <yabinc@google.com>
Thu, 5 Mar 2015 06:35:13 +0000 (22:35 -0800)
Change-Id: I9b88cbcec51b6f1dbac2780a9bf82851bd6cc87c

tests/fortify_sprintf_warnings.cpp

index 0ea8fcd..341f48b 100644 (file)
@@ -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\*)}}) will always overflow destination buffer
+  // GCC: warning: call to int __builtin___vsprintf_chk(char*, int, {{(long )?}}unsigned int, const char*, {{(__va_list)|(void\*)|(char\*)}}) 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\*)}}) 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\*)}}) will always overflow destination buffer
   // clang should emit a warning, but doesn't
   vsnprintf(buf, 5, "foobar", va);  // NOLINT(runtime/printf)