BUG=skia:3244
Review URL: https://codereview.chromium.org/
805803002
#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));