diff options
author | Ben Wagner <bungeman@google.com> | 2018-03-13 16:56:43 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-13 22:18:18 +0000 |
commit | f8a131dd47a821c47b0c0cafdfe15b09ea92c54c (patch) | |
tree | d369c3f350c1ca2f443c90a3e919373c444b6c3e /tests | |
parent | 40481bb39242b0a6dc4fec3dc9f3f482ee4b8b57 (diff) |
Compile with GCC 7.2.0.
This suppresses the noexcept-type warning, since Skia doesn't have a
stable ABI in any event. GCC now warns on more printf style formats,
so we have to hide our bad test formats a little better. GCC now
also warns on implicit enum to bool conversions, which did catch two
issues.
Change-Id: Ib81769c421757186506873f0fe298ecd0106ae87
Reviewed-on: https://skia-review.googlesource.com/114263
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/StringTest.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/StringTest.cpp b/tests/StringTest.cpp index 7c0c8663f9..06c18f6f53 100644 --- a/tests/StringTest.cpp +++ b/tests/StringTest.cpp @@ -14,6 +14,8 @@ #include "SkString.h" #include "SkStringUtils.h" +static const char* gThirtyWideDecimal = "%30d"; + DEF_TEST(String, reporter) { SkString a; SkString b((size_t)0); @@ -169,7 +171,7 @@ DEF_TEST(String, reporter) { REPORTER_ASSERT(reporter, buffer[18] == 'a'); REPORTER_ASSERT(reporter, buffer[19] == 'a'); REPORTER_ASSERT(reporter, buffer[20] == 'a'); - snprintf(buffer, 20, "%30d", 0); + snprintf(buffer, 20, gThirtyWideDecimal, 0); REPORTER_ASSERT(reporter, buffer[18] == ' '); REPORTER_ASSERT(reporter, buffer[19] == 0); REPORTER_ASSERT(reporter, buffer[20] == 'a'); |