[FFmpeg-devel] [PATCH] avutil/md5: workaround clang 3.5 #20849

Michael Niedermayer michaelni at gmx.at
Fri Sep 5 00:31:39 CEST 2014


This avoids several failures on fate.ffmpeg.org, and thus makes real
bugs easier to spot

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libavutil/md5.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/md5.c b/libavutil/md5.c
index 63fc37d..32c5c27 100644
--- a/libavutil/md5.c
+++ b/libavutil/md5.c
@@ -218,7 +218,7 @@ static void print_md5(uint8_t *md5)
 int main(void){
     uint8_t md5val[16];
     int i;
-    uint8_t in[1000];
+    volatile uint8_t in[1000]; // volatile to workaround http://llvm.org/bugs/show_bug.cgi?id=20849
 
     for (i = 0; i < 1000; i++)
         in[i] = i * i;
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list