diff options
Diffstat (limited to 'tests/ImageIsOpaqueTest.cpp')
-rw-r--r-- | tests/ImageIsOpaqueTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ImageIsOpaqueTest.cpp b/tests/ImageIsOpaqueTest.cpp index 6fdbc8127a..6d886d48bf 100644 --- a/tests/ImageIsOpaqueTest.cpp +++ b/tests/ImageIsOpaqueTest.cpp @@ -17,8 +17,8 @@ #include "SkWriteBuffer.h" static void test_flatten(skiatest::Reporter* reporter, const SkImageInfo& info) { - // just need a safe amount of storage - char storage[sizeof(SkImageInfo)*2]; + // just need a safe amount of storage, but ensure that it is 4-byte aligned. + int32_t storage[(sizeof(SkImageInfo)*2) / sizeof(int32_t)]; SkWriteBuffer wb(storage, sizeof(storage)); info.flatten(wb); SkASSERT(wb.bytesWritten() < sizeof(storage)); |