Quoting Vittorio Giovara (2015-07-27 16:12:04)
> On Sat, Jul 25, 2015 at 9:18 AM, Anton Khirnov <[email protected]> wrote:
> > Quoting Vittorio Giovara (2015-07-25 05:07:04)
> >> From: James Almer <[email protected]>
> >>
> >> Silences warnings when using -Wshift-overflow (GCC 6+).
> >>
> >> Signed-off-by: James Almer <[email protected]>
> >> ---
> >>  libavcodec/texturedsp.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/libavcodec/texturedsp.c b/libavcodec/texturedsp.c
> >> index 7a706b4..19aa353 100644
> >> --- a/libavcodec/texturedsp.c
> >> +++ b/libavcodec/texturedsp.c
> >> @@ -425,7 +425,7 @@ static inline void rgtc_block_internal(uint8_t
> >> *dst, ptrdiff_t stride,
> >>              int i = indices[x + y * 4];
> >>              /* Interval expansion from [-1 1] or [0 1] to [0 255]. */
> >>              int c = color_tab[i];
> >> -            uint32_t pixel = RGBA(c, c, c, 255);
> >> +            uint32_t pixel = RGBA(c, c, c, 255U);
> >
> > Doesn't the same apply to all the other uses of this macro, where the
> > last parameter is a signed int?
> 
> possibly, maybe it's better to cast to unsigned directly in the macro itself?

Why should it be int in the first place?

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

Reply via email to