Re: [libav-devel] [PATCH 2/3] avconv_opt: Rework hwaccels array iteration to avoid a warning on empty array

2016-11-03 Thread Luca Barbato
On 03/11/2016 18:32, Diego Biurrun wrote: > -for (i = 0; i < FF_ARRAY_ELEMS(hwaccels) - 1; i++) { > +while (hwaccels[i++].name) for (i = 0; hwaccels[i].name; i++) { Is how it is used everywhere else. Alternatively we can drop `-Wtype-limits` and use the FF_ARRAY_ELEMS() everywhere.

Re: [libav-devel] [PATCH 2/3] avconv_opt: Rework hwaccels array iteration to avoid a warning on empty array

2016-11-03 Thread Vittorio Giovara
On Thu, Nov 3, 2016 at 3:42 PM, Anton Khirnov wrote: > Quoting Diego Biurrun (2016-11-03 18:32:35) >> avconv_opt.c:188:19: warning: comparison of unsigned expression < 0 is >> always false [-Wtype-limits] >> --- >> avconv_opt.c | 5 ++--- >> 1 file changed, 2 insertions(+), 3

Re: [libav-devel] [PATCH 2/3] avconv_opt: Rework hwaccels array iteration to avoid a warning on empty array

2016-11-03 Thread Anton Khirnov
Quoting Diego Biurrun (2016-11-03 18:32:35) > avconv_opt.c:188:19: warning: comparison of unsigned expression < 0 is always > false [-Wtype-limits] > --- > avconv_opt.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/avconv_opt.c b/avconv_opt.c > index

[libav-devel] [PATCH 2/3] avconv_opt: Rework hwaccels array iteration to avoid a warning on empty array

2016-11-03 Thread Diego Biurrun
avconv_opt.c:188:19: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] --- avconv_opt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/avconv_opt.c b/avconv_opt.c index 1064cf4..a3fd3dd 100644 --- a/avconv_opt.c +++ b/avconv_opt.c @@ -187,12