[PATCH 1/2] avcodec/movtextenc: fix undefined shift
Silences warnings when using -Wshift-overflow (GCC 6+) Signed-off-by: James Almer <jamrial@gmail.com> --- libavcodec/movtextenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/movtextenc.c b/libavcodec/movtextenc.c index 3219858..144e6d7 100644 --- a/libavcodec/movtextenc.c +++ b/libavcodec/movtextenc.c @@ -289,7 +289,7 @@ static void mov_text_color_cb(void *priv, unsigned int color, unsigned int color s->box_flags |= HCLR_BOX; s->box_flags |= HLIT_BOX; s->hlit.start = AV_RB16(&s->text_pos); - s->hclr.color = color | (0xFF << 24); //set alpha value to FF + s->hclr.color = color | (0xFFU << 24); //set alpha value to FF } } /* If there are more than one secondary color changes in ASS, take start of -- 2.4.5
Silences warnings when using -Wshift-overflow (GCC 6+) Signed-off-by: James Almer <jamrial@gmail.com> --- 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); AV_WL32(dst + x * 4 + y * stride, pixel); } } -- 2.4.5
On Fri, Jul 24, 2015 at 10:14:00PM -0300, James Almer wrote:
Silences warnings when using -Wshift-overflow (GCC 6+)
Signed-off-by: James Almer <jamrial@gmail.com> --- libavcodec/texturedsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
LGTM thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No human being will ever know the Truth, for even if they happen to say it by chance, they would not even known they had done so. -- Xenophanes
On 25/07/15 12:59 AM, Michael Niedermayer wrote:
On Fri, Jul 24, 2015 at 10:14:00PM -0300, James Almer wrote:
Silences warnings when using -Wshift-overflow (GCC 6+)
Signed-off-by: James Almer <jamrial@gmail.com> --- libavcodec/texturedsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
LGTM
thanks
Pushed.
participants (2)
-
James Almer -
Michael Niedermayer