On Sun, 15 Jul 2012, Måns Rullgård wrote:

Martin Storsjö <[email protected]> writes:

From: "Ronald S. Bultje" <[email protected]>

---
A non-mangled version of Ronald's patch. Builds fine on MSVC.

 libavcodec/dsputil.h |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index 77980e0..361b56c 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -646,18 +646,18 @@ void ff_mlp_init_x86(DSPContext* c, AVCodecContext 
*avctx);

 #define LOCAL_ALIGNED_D(a, t, v, s, o, ...) DECLARE_ALIGNED(a, t, v) s o

-#define LOCAL_ALIGNED(a, t, v, ...) LOCAL_ALIGNED_A(a, t, v, __VA_ARGS__,,)
+#define LOCAL_ALIGNED(a, t, v, s, ...) LOCAL_ALIGNED_A(a, t, v, s, 
__VA_ARGS__,)

This will break things with strict compilers.  GCC is not a strict compiler.

 #if HAVE_LOCAL_ALIGNED_8
-#   define LOCAL_ALIGNED_8(t, v, ...) LOCAL_ALIGNED_D(8, t, v, __VA_ARGS__,,)
+#   define LOCAL_ALIGNED_8(t, v, s, ...) LOCAL_ALIGNED_D(8, t, v, s, 
__VA_ARGS__,)
 #else
-#   define LOCAL_ALIGNED_8(t, v, ...) LOCAL_ALIGNED(8, t, v, __VA_ARGS__)
+#   define LOCAL_ALIGNED_8(t, v, s, ...) LOCAL_ALIGNED(8, t, v, s, __VA_ARGS__)
 #endif

And this too.

The current code is perfectly standards-compliant while the patched one
is not and WILL BREAK.

Could a version of this be added within #ifdef _MSC_VER then?

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to