[FFmpeg-devel] [PATCH v4] libavutil/tests/md5: Remove 'volatile workaround' to avoid warnings

softworkz ffmpegagent at gmail.com
Sat May 28 18:07:00 EEST 2022


From: softworkz <softworkz at hotmail.com>

Those are always showing up on Patchwork when FATE tests are failing,
covering some possibly more useful information.

The volatile keyword was used as a workaround for an eight year old
clang version.

Signed-off-by: softworkz <softworkz at hotmail.com>
---
    libavutil/tests/md5: Avoid warnings
    
    Those are always showing up on Patchwork when FATE tests are failing,
    covering some possibly more useful information.
    
    v4:
    
     * The problem still exists:
       https://patchwork.ffmpeg.org/check/62130/
     * as was suggested, this patch removes the volatile keyword altogether

Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-20%2Fsoftworkz%2Fsubmit_md5-v4
Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-20/softworkz/submit_md5-v4
Pull-Request: https://github.com/ffstaging/FFmpeg/pull/20

Range-diff vs v3:

 1:  e54769c621 ! 1:  21fdf3eba2 libavutil/tests/md5: Avoid warnings
     @@ Metadata
      Author: softworkz <softworkz at hotmail.com>
      
       ## Commit message ##
     -    libavutil/tests/md5: Avoid warnings
     +    libavutil/tests/md5: Remove 'volatile workaround' to avoid warnings
      
     -    Those are always showing up on Patchwork
     -    when FATE tests are failing, covering
     -    some possibly more useful information.
     +    Those are always showing up on Patchwork when FATE tests are failing,
     +    covering some possibly more useful information.
     +
     +    The volatile keyword was used as a workaround for an eight year old
     +    clang version.
      
          Signed-off-by: softworkz <softworkz at hotmail.com>
      
     @@ libavutil/tests/md5.c: int main(void)
      -    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
      +
     -+#if defined(__clang__) && defined(__clang_major__) && __clang_major__ < 4
     -+    volatile // volatile to workaround http://llvm.org/bugs/show_bug.cgi?id=20849
     -+#endif
      +    uint8_t in[1000];
       
           for (i = 0; i < 1000; i++)


 libavutil/tests/md5.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavutil/tests/md5.c b/libavutil/tests/md5.c
index 42e4538e0a..0ac8f2834e 100644
--- a/libavutil/tests/md5.c
+++ b/libavutil/tests/md5.c
@@ -33,8 +33,8 @@ int main(void)
 {
     uint8_t md5val[16];
     int i;
-    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
+
+    uint8_t in[1000];
 
     for (i = 0; i < 1000; i++)
         in[i] = i * i;

base-commit: 9fba0b8a8c754a012fc74c90ffb7c26a56be8ca0
-- 
ffmpeg-codebot


More information about the ffmpeg-devel mailing list