summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2015-03-04 21:43:14 -0800
committerYabin Cui <yabinc@google.com>2015-03-04 21:43:14 -0800
commitf3bd305b8f8270f157ee79851fc630abd94d3245 (patch)
tree081017b1a01aff24767fa5f7c58ede336ebd2af5 /tests
parente1c0213be3f0c2c4e310cbc262da88835a2e5d86 (diff)
downloadbionic-f3bd305b8f8270f157ee79851fc630abd94d3245.zip
bionic-f3bd305b8f8270f157ee79851fc630abd94d3245.tar.gz
bionic-f3bd305b8f8270f157ee79851fc630abd94d3245.tar.bz2
Fix fortify compilation test on mips.
Change-Id: Icff5b859ae58067bfa34430d3f5684335fe063b4
Diffstat (limited to 'tests')
-rw-r--r--tests/fortify_sprintf_warnings.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/fortify_sprintf_warnings.cpp b/tests/fortify_sprintf_warnings.cpp
index 141bc1d..0ea8fcd 100644
--- a/tests/fortify_sprintf_warnings.cpp
+++ b/tests/fortify_sprintf_warnings.cpp
@@ -96,7 +96,7 @@ void test_strcpy() {
char buf[4];
// NOLINTNEXTLINE(whitespace/line_length)
- // GCC: warning: call to {{(char\* __builtin___strcpy_chk\(char\*, const char\*, unsigned int\))|(void\* __builtin___memcpy_chk\(void\*, const void\*, long unsigned int, long unsigned int\))}} will always overflow destination buffer
+ // GCC: warning: call to {{(char\* __builtin___strcpy_chk\(char\*, const char\*, unsigned int\))|(void\* __builtin___memcpy_chk\(void\*, const void\*, (long )?unsigned int, (long )?unsigned int\))}} will always overflow destination buffer
// clang should emit a warning, but doesn't
strcpy(buf, "foobar"); // NOLINT(runtime/printf)
}
@@ -123,7 +123,7 @@ void test_strcat() {
char buf[4] = "";
// NOLINTNEXTLINE(whitespace/line_length)
- // GCC: warning: call to {{(char\* __builtin___strcat_chk\(char\*, const char\*, unsigned int\))|(void\* __builtin___memcpy_chk\(void\*, const void\*, long unsigned int, long unsigned int\))}} will always overflow destination buffer
+ // GCC: warning: call to {{(char\* __builtin___strcat_chk\(char\*, const char\*, unsigned int\))|(void\* __builtin___memcpy_chk\(void\*, const void\*, (long )?unsigned int, (long )?unsigned int\))}} will always overflow destination buffer
// clang should emit a warning, but doesn't
strcat(buf, "foobar"); // NOLINT(runtime/printf)
}
@@ -132,7 +132,7 @@ void test_strncat() {
char buf[4] = "";
// NOLINTNEXTLINE(whitespace/line_length)
- // GCC: warning: call to {{(char\* __builtin___strcat_chk\(char\*, const char\*, unsigned int\))|(void\* __builtin___memcpy_chk\(void\*, const void\*, long unsigned int, long unsigned int\))}} will always overflow destination buffer
+ // GCC: warning: call to {{(char\* __builtin___strcat_chk\(char\*, const char\*, unsigned int\))|(void\* __builtin___memcpy_chk\(void\*, const void\*, (long )?unsigned int, (long )?unsigned int\))}} will always overflow destination buffer
// gcc output warning with __builtin___strcat_chk for __builtin___strncat_chk.
// clang should emit a warning, but doesn't
strncat(buf, "foobar", sizeof("foobar"));
@@ -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) will always overflow destination buffer
+ // GCC: warning: call to int __builtin___vsprintf_chk(char*, int, {{(long )?}}unsigned int, const char*, {{(__va_list)|(void\*)}}) 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) 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\*)}}) will always overflow destination buffer
// clang should emit a warning, but doesn't
vsnprintf(buf, 5, "foobar", va); // NOLINT(runtime/printf)