diff mbox

[FFmpeg-devel] avfilter/f_sidedata: fix Wtautological-constant-out-of-range-compare

Message ID 20191015171754.69546-1-quinkblack@foxmail.com
State Accepted
Commit af70c94c63cc0ccf6a8078e87c81d061b8765889
Headers show

Commit Message

Zhao Zhili Oct. 15, 2019, 5:17 p.m. UTC
---
How about add AV_FRAME_DATA_NONE to AVFrameSideDataType?

 libavfilter/f_sidedata.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Zhao Zhili Oct. 30, 2019, 10:50 a.m. UTC | #1
> On Oct 16, 2019, at 1:17 AM, Zhao Zhili <quinkblack@foxmail.com> wrote:
> 
> ---
> How about add AV_FRAME_DATA_NONE to AVFrameSideDataType?

Ping for the patch.

> 
> libavfilter/f_sidedata.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavfilter/f_sidedata.c b/libavfilter/f_sidedata.c
> index 381da5a052..4210dcac4c 100644
> --- a/libavfilter/f_sidedata.c
> +++ b/libavfilter/f_sidedata.c
> @@ -39,7 +39,7 @@ typedef struct SideDataContext {
>     const AVClass *class;
> 
>     int mode;
> -    enum AVFrameSideDataType type;
> +    int type;   // enum AVFrameSideDataType or -1 for delete side data mode
> } SideDataContext;
> 
> #define OFFSET(x) offsetof(SideDataContext, x)
> -- 
> 2.21.0
> 
> 
> 
> _______________________________________________
> 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".
Paul B Mahol Oct. 30, 2019, 10:58 a.m. UTC | #2
LGTM

On 10/15/19, Zhao Zhili <quinkblack@foxmail.com> wrote:
> ---
> How about add AV_FRAME_DATA_NONE to AVFrameSideDataType?
>
>  libavfilter/f_sidedata.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/f_sidedata.c b/libavfilter/f_sidedata.c
> index 381da5a052..4210dcac4c 100644
> --- a/libavfilter/f_sidedata.c
> +++ b/libavfilter/f_sidedata.c
> @@ -39,7 +39,7 @@ typedef struct SideDataContext {
>      const AVClass *class;
>
>      int mode;
> -    enum AVFrameSideDataType type;
> +    int type;   // enum AVFrameSideDataType or -1 for delete side data mode
>  } SideDataContext;
>
>  #define OFFSET(x) offsetof(SideDataContext, x)
> --
> 2.21.0
>
>
>
> _______________________________________________
> 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".
Michael Niedermayer Oct. 30, 2019, 5:04 p.m. UTC | #3
On Wed, Oct 30, 2019 at 11:58:15AM +0100, Paul B Mahol wrote:
> LGTM

will apply

thx

[...]
diff mbox

Patch

diff --git a/libavfilter/f_sidedata.c b/libavfilter/f_sidedata.c
index 381da5a052..4210dcac4c 100644
--- a/libavfilter/f_sidedata.c
+++ b/libavfilter/f_sidedata.c
@@ -39,7 +39,7 @@  typedef struct SideDataContext {
     const AVClass *class;
 
     int mode;
-    enum AVFrameSideDataType type;
+    int type;   // enum AVFrameSideDataType or -1 for delete side data mode
 } SideDataContext;
 
 #define OFFSET(x) offsetof(SideDataContext, x)