From 6235147ed50e3e090101fce0eee3d89902fbdfba Mon Sep 17 00:00:00 2001 From: James Zern Date: Mon, 2 May 2016 20:22:05 -0700 Subject: [PATCH] cherry-pick decoder fix for 64-bit android devices This fixes decoders built against clang-3.8 (r11c). Without this change bad conditional code would be generated causing all calls to WebPParseHeaders() to return 4 (UNSUPPORTED_FEATURE). Original fix: https://android-review.googlesource.com/#/c/196123 Change-Id: Id4b4d84048d347cea110b6cf297ef9ef4fbed323 --- src/dec/webp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dec/webp.c b/src/dec/webp.c index 0a7162b3..101dadfb 100644 --- a/src/dec/webp.c +++ b/src/dec/webp.c @@ -415,7 +415,8 @@ static VP8StatusCode ParseHeadersInternal(const uint8_t* data, } VP8StatusCode WebPParseHeaders(WebPHeaderStructure* const headers) { - VP8StatusCode status; + // status is marked volatile as a workaround for a clang-3.8 (aarch64) bug + volatile VP8StatusCode status; int has_animation = 0; assert(headers != NULL); // fill out headers, ignore width/height/has_alpha.