diff mbox series

[FFmpeg-devel,1/6] avutil/common: use unsigned int in GET_UTF8

Message ID 20200129233235.3325-1-cus@passwd.hu
State Accepted
Headers show
Series [FFmpeg-devel,1/6] avutil/common: use unsigned int in GET_UTF8
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Marton Balint Jan. 29, 2020, 11:32 p.m. UTC
Right shift of signed value is impelentation defined.

Signed-off-by: Marton Balint <cus@passwd.hu>
---
 libavutil/common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul B Mahol Jan. 30, 2020, 10:41 a.m. UTC | #1
bug in commit message, otherwise lgtm

On 1/30/20, Marton Balint <cus@passwd.hu> wrote:
> Right shift of signed value is impelentation defined.
>
> Signed-off-by: Marton Balint <cus@passwd.hu>
> ---
>  libavutil/common.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavutil/common.h b/libavutil/common.h
> index f09f0b486b..5568754bb9 100644
> --- a/libavutil/common.h
> +++ b/libavutil/common.h
> @@ -389,7 +389,7 @@ static av_always_inline av_const int
> av_parity_c(uint32_t v)
>          if ((val & 0xc0) == 0x80 || val >= 0xFE)\
>              ERROR\
>          while (val & top) {\
> -            int tmp= (GET_BYTE) - 128;\
> +            unsigned int tmp = (GET_BYTE) - 128;\
>              if(tmp>>6)\
>                  ERROR\
>              val= (val<<6) + tmp;\
> --
> 2.16.4
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Marton Balint Jan. 30, 2020, 11:25 p.m. UTC | #2
On Thu, 30 Jan 2020, Paul B Mahol wrote:

> bug in commit message, otherwise lgtm

Thanks, pushed the series.

Regards,
Marton
diff mbox series

Patch

diff --git a/libavutil/common.h b/libavutil/common.h
index f09f0b486b..5568754bb9 100644
--- a/libavutil/common.h
+++ b/libavutil/common.h
@@ -389,7 +389,7 @@  static av_always_inline av_const int av_parity_c(uint32_t v)
         if ((val & 0xc0) == 0x80 || val >= 0xFE)\
             ERROR\
         while (val & top) {\
-            int tmp= (GET_BYTE) - 128;\
+            unsigned int tmp = (GET_BYTE) - 128;\
             if(tmp>>6)\
                 ERROR\
             val= (val<<6) + tmp;\