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

Michael Niedermayer git at videolan.org
Fri Sep 5 00:53:45 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Sep  5 00:31:39 2014 +0200| [467a55a4ee54c4ff17b503a5ea5e5c054ab23e9b] | committer: Michael Niedermayer

avutil/md5: workaround clang 3.5 #20849

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

Reviewed-by: James Darnley <james.darnley at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=467a55a4ee54c4ff17b503a5ea5e5c054ab23e9b
---

 libavutil/md5.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavutil/md5.c b/libavutil/md5.c
index 63fc37d..876bd55 100644
--- a/libavutil/md5.c
+++ b/libavutil/md5.c
@@ -218,7 +218,8 @@ 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
+    // FIXME remove volatile once it has been fixed and all fate clients are updated
 
     for (i = 0; i < 1000; i++)
         in[i] = i * i;



More information about the ffmpeg-cvslog mailing list