From f516585e10b8a20f16c26b6e593745d0bb04a6cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Bostr=C3=B6m?= Date: Wed, 29 Jun 2016 20:25:24 +0200 Subject: [PATCH] Workaround for clang bug http://llvm.org/PR28348. Permits rolling chromium further. BUG= TBR=tommi@webrtc.org Review URL: https://codereview.webrtc.org/2110043003 . Cr-Commit-Position: refs/heads/master@{#13330} --- webrtc/media/base/videoframe_unittest.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webrtc/media/base/videoframe_unittest.h b/webrtc/media/base/videoframe_unittest.h index f19d0325d6..06afd0eb4c 100644 --- a/webrtc/media/base/videoframe_unittest.h +++ b/webrtc/media/base/videoframe_unittest.h @@ -1216,7 +1216,10 @@ class VideoFrameTest : public testing::Test { EXPECT_FALSE(expected_result); // NULL is okay if failure was expected. return; } - data_ptr += kPadToHeapSized + (-(static_cast(data_size)) & 4095); + // TODO(pbos): Remove kPad once http://llvm.org/PR28348 is fixed and the fix + // is rolled in. + volatile const int kPad = 4095; + data_ptr += kPadToHeapSized + (-(static_cast(data_size)) & kPad); memcpy(data_ptr, sample, std::min(data_size, sample_size)); for (int i = 0; i < repeat_; ++i) { EXPECT_EQ(expected_result, frame.Validate(fourcc, kWidth, kHeight,