Merge "Suppress -Wformat warning"
This commit is contained in:
commit
8321ff1468
1 changed files with 3 additions and 0 deletions
|
@ -364,10 +364,13 @@ TEST(STDIO_TEST, snprintf_S) { // Synonym for %ls.
|
|||
|
||||
TEST_F(STDIO_DEATHTEST, snprintf_n) {
|
||||
#if defined(__BIONIC__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat"
|
||||
// http://b/14492135 and http://b/31832608.
|
||||
char buf[32];
|
||||
int i = 1234;
|
||||
EXPECT_DEATH(snprintf(buf, sizeof(buf), "a %n b", &i), "%n not allowed on Android");
|
||||
#pragma GCC diagnostic pop
|
||||
#else
|
||||
GTEST_SKIP() << "glibc does allow %n";
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue