Re: [FFmpeg-devel] [PATCH] avutil/video_enc_param: fix warning

2020-05-22 Thread Anton Khirnov
Quoting Nicolas George (2020-05-21 17:10:00) > Anton Khirnov (12020-05-21): > > This is wrong. We should not fix warnings, we should fix bugs. Warnings > > suggest there may be a bug, but not all warnings are correct. > > > > In this case, I believe the warnings is invalid and there is no problem

Re: [FFmpeg-devel] [PATCH] avutil/video_enc_param: fix warning

2020-05-21 Thread Nicolas George
Anton Khirnov (12020-05-21): > This is wrong. We should not fix warnings, we should fix bugs. Warnings > suggest there may be a bug, but not all warnings are correct. > > In this case, I believe the warnings is invalid and there is no problem > to fix. It's correct that the comparison is always fa

Re: [FFmpeg-devel] [PATCH] avutil/video_enc_param: fix warning

2020-05-21 Thread Anton Khirnov
> [FFmpeg-devel] [PATCH] avutil/video_enc_param: fix warning This is wrong. We should not fix warnings, we should fix bugs. Warnings suggest there may be a bug, but not all warnings are correct. In this case, I believe the warnings is invalid and there is no problem to fix. It's correct

Re: [FFmpeg-devel] [PATCH] avutil/video_enc_param: fix warning

2020-05-21 Thread lance . lmwang
On Thu, May 21, 2020 at 04:34:57PM +0200, Carl Eugen Hoyos wrote: > Am Do., 21. Mai 2020 um 16:21 Uhr schrieb : > > > > From: Limin Wang > > > > warning: comparison is always false due to limited range of data type > > [-Wtype-limits] > > Also nb_blocks is unsigned int, so nb_blocks * sizeof(AVVi

Re: [FFmpeg-devel] [PATCH] avutil/video_enc_param: fix warning

2020-05-21 Thread Nicolas George
lance.lmw...@gmail.com (12020-05-21): > I'm not sure, Mac compile give below warning: > > warning: comparison of constant 922337203685477580 with expression of type > 'unsigned int' is always false > [-Wtautological-constant-out-of-range-compare] > Certainly. And? > > The cast is unnece

Re: [FFmpeg-devel] [PATCH] avutil/video_enc_param: fix warning

2020-05-21 Thread lance . lmwang
On Thu, May 21, 2020 at 04:34:39PM +0200, Nicolas George wrote: > lance.lmw...@gmail.com (12020-05-21): > > From: Limin Wang > > > > warning: comparison is always false due to limited range of data type > > [-Wtype-limits] > > > Also nb_blocks is unsigned int, so nb_blocks * sizeof(AVVideoBlock

Re: [FFmpeg-devel] [PATCH] avutil/video_enc_param: fix warning

2020-05-21 Thread Carl Eugen Hoyos
Am Do., 21. Mai 2020 um 16:21 Uhr schrieb : > > From: Limin Wang > > warning: comparison is always false due to limited range of data type > [-Wtype-limits] > Also nb_blocks is unsigned int, so nb_blocks * sizeof(AVVideoBlockParams) may > overflow, > so force to size_t > > Signed-off-by: Limin W

Re: [FFmpeg-devel] [PATCH] avutil/video_enc_param: fix warning

2020-05-21 Thread Nicolas George
lance.lmw...@gmail.com (12020-05-21): > From: Limin Wang > > warning: comparison is always false due to limited range of data type > [-Wtype-limits] > Also nb_blocks is unsigned int, so nb_blocks * sizeof(AVVideoBlockParams) may > overflow, > so force to size_t No it may not, the test just be

[FFmpeg-devel] [PATCH] avutil/video_enc_param: fix warning

2020-05-21 Thread lance . lmwang
From: Limin Wang warning: comparison is always false due to limited range of data type [-Wtype-limits] Also nb_blocks is unsigned int, so nb_blocks * sizeof(AVVideoBlockParams) may overflow, so force to size_t Signed-off-by: Limin Wang --- libavutil/video_enc_params.c | 4 ++-- 1 file change