[FFmpeg-devel] [PATCH] Make DECLARE_ALIGNED macros take array specifiers as separate argument

Måns Rullgård mans
Wed Jan 20 23:25:28 CET 2010

Uoti Urpala <uoti.urpala at pp1.inet.fi> writes:

> On Wed, 2010-01-20 at 22:30 +0100, Reimar D?ffinger wrote:
>> On Wed, Jan 20, 2010 at 09:08:13PM +0000, Mans Rullgard wrote:
>> >  void dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx);
>> >  void dsputil_init_vis(DSPContext* c, AVCodecContext *avctx);
>> >  
>> > -#define DECLARE_ALIGNED_16(t, v) DECLARE_ALIGNED(16, t, v)
>> > -#define DECLARE_ALIGNED_8(t, v)  DECLARE_ALIGNED(8, t, v)
>> > +#define DECLARE_ALIGNED_16(t, v, ...) DECLARE_ALIGNED(16, t, v, __VA_ARGS__)
>> > +#define DECLARE_ALIGNED_8(t, v, ...)  DECLARE_ALIGNED(8, t, v, __VA_ARGS__)
>> Sorry for being a pain, but doesn't this kind of macro strictly not allow you
>> to use DECLARE_ALIGNED_16 with only two arguments?
>> At least gcc still complains about it with -pedantic
> In this case it could be fixed by moving at least one required argument
> into the variable part, as in
> #define DECLARE_ALIGNED_16(t, ...) DECLARE_ALIGNED(16, t, __VA_ARGS__)
> or

That would defeat the intent of this patch, but I have another

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list