aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-10-08 13:21:29 -0700
committerElliott Hughes <enh@google.com>2014-10-08 13:21:29 -0700
commitb4b15c63a17e74f5f6229f7b8ed034cf72e52cf4 (patch)
tree1ad53dc4534dbb509e4d358a2e977b3e075ad363
parent5cc5c5ea0b7a5a2d523ea35c645a42b222929276 (diff)
downloadandroid_bionic-b4b15c63a17e74f5f6229f7b8ed034cf72e52cf4.tar.gz
android_bionic-b4b15c63a17e74f5f6229f7b8ed034cf72e52cf4.tar.bz2
android_bionic-b4b15c63a17e74f5f6229f7b8ed034cf72e52cf4.zip
Fix compile-time tests for LP64.
Change-Id: Ib9bec5c6c77c55679d64c2bc15ab70979c40e66c
-rw-r--r--tests/fortify_sprintf_warnings.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/fortify_sprintf_warnings.cpp b/tests/fortify_sprintf_warnings.cpp
index 2333c3e23..3a2d3c4c1 100644
--- a/tests/fortify_sprintf_warnings.cpp
+++ b/tests/fortify_sprintf_warnings.cpp
@@ -22,12 +22,12 @@ void test_sprintf() {
char buf[4];
// NOLINTNEXTLINE(whitespace/line_length)
- // GCC: warning: call to int __builtin___sprintf_chk(char*, int, unsigned int, const char*, ...) will always overflow destination buffer
+ // GCC: warning: call to int __builtin___sprintf_chk(char*, int, {{(long )?}}unsigned int, const char*, ...) will always overflow destination buffer
// clang should emit a warning, but doesn't
sprintf(buf, "foobar"); // NOLINT(runtime/printf)
// NOLINTNEXTLINE(whitespace/line_length)
- // GCC: warning: call to int __builtin___sprintf_chk(char*, int, unsigned int, const char*, ...) will always overflow destination buffer
+ // GCC: warning: call to int __builtin___sprintf_chk(char*, int, {{(long )?}}unsigned int, const char*, ...) will always overflow destination buffer
// clang should emit a warning, but doesn't
sprintf(buf, "%s", "foobar"); // NOLINT(runtime/printf)
}
@@ -36,22 +36,22 @@ void test_snprintf() {
char buf[4];
// NOLINTNEXTLINE(whitespace/line_length)
- // GCC: warning: call to int __builtin___snprintf_chk(char*, unsigned int, int, unsigned int, const char*, ...) will always overflow destination buffer
+ // GCC: warning: call to int __builtin___snprintf_chk(char*, {{(long )?}}unsigned int, int, {{(long )?}}unsigned int, const char*, ...) will always overflow destination buffer
// clang should emit a warning, but doesn't
snprintf(buf, 5, "foobar"); // NOLINT(runtime/printf)
// NOLINTNEXTLINE(whitespace/line_length)
- // GCC: warning: call to int __builtin___snprintf_chk(char*, unsigned int, int, unsigned int, const char*, ...) will always overflow destination buffer
+ // GCC: warning: call to int __builtin___snprintf_chk(char*, {{(long )?}}unsigned int, int, {{(long )?}}unsigned int, const char*, ...) will always overflow destination buffer
// clang should emit a warning, but doesn't
snprintf(buf, 5, "%s", "foobar"); // NOLINT(runtime/printf)
// NOLINTNEXTLINE(whitespace/line_length)
- // GCC: warning: call to int __builtin___snprintf_chk(char*, unsigned int, int, unsigned int, const char*, ...) will always overflow destination buffer
+ // GCC: warning: call to int __builtin___snprintf_chk(char*, {{(long )?}}unsigned int, int, {{(long )?}}unsigned int, const char*, ...) will always overflow destination buffer
// clang should emit a warning, but doesn't
snprintf(buf, 5, " %s ", "foobar"); // NOLINT(runtime/printf)
// NOLINTNEXTLINE(whitespace/line_length)
- // GCC: warning: call to int __builtin___snprintf_chk(char*, unsigned int, int, unsigned int, const char*, ...) will always overflow destination buffer
+ // GCC: warning: call to int __builtin___snprintf_chk(char*, {{(long )?}}unsigned int, int, {{(long )?}}unsigned int, const char*, ...) will always overflow destination buffer
// clang should emit a warning, but doesn't
snprintf(buf, 5, "%d", 100000); // NOLINT(runtime/printf)
}