Re: [FFmpeg-devel] [PATCH] fix few compiler warnings
On Fri, Jun 03, 2016 at 12:56:36AM +, Davinder Singh wrote: > On Thu, Jun 2, 2016 at 5:18 PM Michael Niedermayer> wrote: > > > On Sun, May 22, 2016 at 01:51:05AM +, Davinder Singh wrote: > > [...] > > > > > vf_hwdownload.c |6 -- > > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > 5eb7416fececde847414f37de9a78a4e1cd5e1af > > 0004-libavfilter-vf_hwdownload-show-error-when-ff_formats.patch > > > From d1d00989a374facba3cdf777d95c61bf385f1332 Mon Sep 17 00:00:00 2001 > > > From: dsmudhar > > > Date: Sun, 22 May 2016 06:26:36 +0530 > > > Subject: [PATCH 4/7] libavfilter/vf_hwdownload: show error when > > ff_formats_ref > > > fails > > > > > > --- > > > libavfilter/vf_hwdownload.c | 6 -- > > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > > > diff --git a/libavfilter/vf_hwdownload.c b/libavfilter/vf_hwdownload.c > > > index 2dcc9fa..79ea82d 100644 > > > --- a/libavfilter/vf_hwdownload.c > > > +++ b/libavfilter/vf_hwdownload.c > > > @@ -56,8 +56,10 @@ static int hwdownload_query_formats(AVFilterContext > > *avctx) > > > } > > > } > > > > > > -ff_formats_ref(infmts, >inputs[0]->out_formats); > > > -ff_formats_ref(outfmts, >outputs[0]->in_formats); > > > +if ((err = ff_formats_ref(infmts, >inputs[0]->out_formats)) > > < 0 || > > > +(err = ff_formats_ref(outfmts, >outputs[0]->in_formats)) > > < 0) > > > +return err; > > > > according to coverity this introduces a memleak > > (1362184) > > ill send you an invite so you can take a look > > > > [...] > > > > -- > > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > > > Those who are too smart to engage in politics are punished by being > > governed by those who are dumber. -- Plato > > ___ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > this patch should fix it > > Thanks, > DSM_ > vf_hwdownload.c | 14 -- > 1 file changed, 8 insertions(+), 6 deletions(-) > 7b9bf5b1d20562c575b6aa815e47e8a22a888ccb > 0001-vf_hwdownload-fix-memory-leak.patch > From 2cdac9e4bc4b66294a561776f0284499d4971282 Mon Sep 17 00:00:00 2001 > From: dsmudhar > Date: Fri, 3 Jun 2016 06:19:25 +0530 > Subject: [PATCH] vf_hwdownload: fix memory leak > > --- > libavfilter/vf_hwdownload.c | 14 -- > 1 file changed, 8 insertions(+), 6 deletions(-) > > diff --git a/libavfilter/vf_hwdownload.c b/libavfilter/vf_hwdownload.c > index 79ea82d..f012356 100644 > --- a/libavfilter/vf_hwdownload.c > +++ b/libavfilter/vf_hwdownload.c > @@ -49,18 +49,20 @@ static int hwdownload_query_formats(AVFilterContext > *avctx) > err = ff_add_format(, av_pix_fmt_desc_get_id(desc)); > else > err = ff_add_format(, av_pix_fmt_desc_get_id(desc)); > -if (err) { > -ff_formats_unref(); > -ff_formats_unref(); > -return err; > -} > +if (err < 0) > +goto fail; > } > > if ((err = ff_formats_ref(infmts, >inputs[0]->out_formats)) < 0 > || > (err = ff_formats_ref(outfmts, >outputs[0]->in_formats)) < 0) > -return err; > +goto fail; > > return 0; > + > +fail: > +ff_formats_unref(); > +ff_formats_unref(); this could unref infmts even after successfull ff_formats_ref(infmts, ... which would cause problems i think [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I am the wisest man alive, for I know one thing, and that is that I know nothing. -- Socrates signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] fix few compiler warnings
On Thu, Jun 2, 2016 at 5:18 PM Michael Niedermayerwrote: > On Sun, May 22, 2016 at 01:51:05AM +, Davinder Singh wrote: > [...] > > > vf_hwdownload.c |6 -- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > 5eb7416fececde847414f37de9a78a4e1cd5e1af > 0004-libavfilter-vf_hwdownload-show-error-when-ff_formats.patch > > From d1d00989a374facba3cdf777d95c61bf385f1332 Mon Sep 17 00:00:00 2001 > > From: dsmudhar > > Date: Sun, 22 May 2016 06:26:36 +0530 > > Subject: [PATCH 4/7] libavfilter/vf_hwdownload: show error when > ff_formats_ref > > fails > > > > --- > > libavfilter/vf_hwdownload.c | 6 -- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/libavfilter/vf_hwdownload.c b/libavfilter/vf_hwdownload.c > > index 2dcc9fa..79ea82d 100644 > > --- a/libavfilter/vf_hwdownload.c > > +++ b/libavfilter/vf_hwdownload.c > > @@ -56,8 +56,10 @@ static int hwdownload_query_formats(AVFilterContext > *avctx) > > } > > } > > > > -ff_formats_ref(infmts, >inputs[0]->out_formats); > > -ff_formats_ref(outfmts, >outputs[0]->in_formats); > > +if ((err = ff_formats_ref(infmts, >inputs[0]->out_formats)) > < 0 || > > +(err = ff_formats_ref(outfmts, >outputs[0]->in_formats)) > < 0) > > +return err; > > according to coverity this introduces a memleak > (1362184) > ill send you an invite so you can take a look > > [...] > > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > Those who are too smart to engage in politics are punished by being > governed by those who are dumber. -- Plato > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel this patch should fix it Thanks, DSM_ 0001-vf_hwdownload-fix-memory-leak.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] fix few compiler warnings
On Sun, May 22, 2016 at 01:51:05AM +, Davinder Singh wrote: [...] > vf_hwdownload.c |6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > 5eb7416fececde847414f37de9a78a4e1cd5e1af > 0004-libavfilter-vf_hwdownload-show-error-when-ff_formats.patch > From d1d00989a374facba3cdf777d95c61bf385f1332 Mon Sep 17 00:00:00 2001 > From: dsmudhar> Date: Sun, 22 May 2016 06:26:36 +0530 > Subject: [PATCH 4/7] libavfilter/vf_hwdownload: show error when ff_formats_ref > fails > > --- > libavfilter/vf_hwdownload.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/libavfilter/vf_hwdownload.c b/libavfilter/vf_hwdownload.c > index 2dcc9fa..79ea82d 100644 > --- a/libavfilter/vf_hwdownload.c > +++ b/libavfilter/vf_hwdownload.c > @@ -56,8 +56,10 @@ static int hwdownload_query_formats(AVFilterContext *avctx) > } > } > > -ff_formats_ref(infmts, >inputs[0]->out_formats); > -ff_formats_ref(outfmts, >outputs[0]->in_formats); > +if ((err = ff_formats_ref(infmts, >inputs[0]->out_formats)) < 0 > || > +(err = ff_formats_ref(outfmts, >outputs[0]->in_formats)) < 0) > +return err; according to coverity this introduces a memleak (1362184) ill send you an invite so you can take a look [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Those who are too smart to engage in politics are punished by being governed by those who are dumber. -- Plato signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] fix few compiler warnings
Hi, On Tue, May 24, 2016 at 2:00 PM, Michael Niedermayerwrote: > On Mon, May 23, 2016 at 03:06:35PM +0200, Hendrik Leppkes wrote: > > On Mon, May 23, 2016 at 1:59 PM, Michael Niedermayer > > wrote: > > > On Mon, May 23, 2016 at 07:24:23AM -0400, Ronald S. Bultje wrote: > > >> Hi, > > >> > > >> On Sun, May 22, 2016 at 11:39 PM, Michael Niedermayer < > > >> mich...@niedermayer.cc> wrote: > > >> > > >> > On Sun, May 22, 2016 at 01:51:05AM +, Davinder Singh wrote: > > >> > > On Sun, May 22, 2016 at 2:09 AM Michael Niedermayer > > >> > > > >> > > wrote: > > >> > > > > >> > > > On Sat, May 21, 2016 at 02:21:17PM +, Davinder Singh wrote: > > >> > > > > hi, > > >> > > > > > > >> > > > > this patch fixes following compiler warnings: > > >> > > > > > > >> > > > > libavcodec/cfhd.c:346:78: warning: format specifies type > 'unsigned > > >> > short' > > >> > > > > but the argument has type 'int' [-Wformat] > > >> > > > > av_log(avctx, AV_LOG_DEBUG, "Small chunk length > %"PRIu16" > > >> > > > > %s\n", data * 4, tag < 0 ? "optional" : "required"); > > >> > > > > ~~ > > >> > > > > ^~~~ > > >> > > > > libavcodec/cfhd.c:472:110: warning: format specifies type > 'unsigned > > >> > > > short' > > >> > > > > but the argument has type 'int' [-Wformat] > > >> > > > > av_log(avctx, AV_LOG_DEBUG, "Start of lowpass > coeffs > > >> > > > component > > >> > > > > %"PRIu16" height:%d, width:%d\n", s->channel_num, > lowpass_height, > > >> > > > > lowpass_width); > > >> > > > > > > >> > > > > ~~^~ > > >> > > > > libavcodec/cfhd.c:490:77: warning: format specifies type > 'unsigned > > >> > short' > > >> > > > > but the argument has type 'int' [-Wformat] > > >> > > > > av_log(avctx, AV_LOG_DEBUG, "Lowpass coefficients > > >> > > > %"PRIu16"\n", > > >> > > > > lowpass_width * lowpass_height); > > >> > > > > > ~~ > > >> > > > > ^~ > > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > > libavcodec/dv_tablegen.c:30:60: warning: format specifies type > > >> > 'char' but > > >> > > > > the argument has type 'uint32_t' (aka 'unsigned int') > [-Wformat] > > >> > > > >"{0x%"PRIx32", %"PRId8"}", data[i].vlc, > > >> > data[i].size) > > >> > > > > > > >> > > ~~~^~~~ > > >> > > > > libavcodec/tableprint.h:37:29: note: expanded from macro > > >> > > > > 'WRITE_1D_FUNC_ARGV' > > >> > > > >printf(" "fmtstr",", __VA_ARGS__);\ > > >> > > > > ^~~ > > >> > > > > libavcodec/dv_tablegen.c:30:60: warning: format specifies type > > >> > 'char' but > > >> > > > > the argument has type 'uint32_t' (aka 'unsigned int') > [-Wformat] > > >> > > > >"{0x%"PRIx32", %"PRId8"}", data[i].vlc, > > >> > data[i].size) > > >> > > > > > > >> > > ~~~^~~~ > > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > > libavfilter/af_hdcd.c:896:57: warning: shifting a negative > signed > > >> > value > > >> > > > is > > >> > > > > undefined [-Wshift-negative-value] > > >> > > > > state->readahead = readaheadtab[bits & ~(-1 << > 8)]; > > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > > libavfilter/vf_hwdownload.c:59:5: warning: ignoring return > value of > > >> > > > > function declared with warn_unused_result attribute > [-Wunused-result] > > >> > > > > ff_formats_ref(infmts, >inputs[0]->out_formats); > > >> > > > > ^~ ~~~ > > >> > > > > libavfilter/vf_hwdownload.c:60:5: warning: ignoring return > value of > > >> > > > > function declared with warn_unused_result attribute > [-Wunused-result] > > >> > > > > ff_formats_ref(outfmts, >outputs[0]->in_formats); > > >> > > > > ^~ ~~~ > > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > > libavutil/opencl.c:456:17: warning: variable 'kernel_source' > is used > > >> > > > > uninitialized whenever 'for' loop exits because its condition > is > > >> > false > > >> > > > > [-Wsometimes-uninitialized] > > >> > > > > for (i = 0; i < opencl_ctx.kernel_code_count; i++) { > > >> > > > > ^~~~ > > >> > > > > libavutil/opencl.c:466:10: note: uninitialized use occurs here > > >> > > > > if (!kernel_source) { > > >> > > > > ^ > > >> > > > > libavutil/opencl.c:456:17: note: remove the condition if it > is always > > >> > > > true > > >> > > > > for (i = 0; i < opencl_ctx.kernel_code_count; i++) { > > >> > > > > ^~~~ > > >> > > > > libavutil/opencl.c:448:30: note: initialize the variable > > >> > 'kernel_source' > > >> > > > to > > >>
Re: [FFmpeg-devel] [PATCH] fix few compiler warnings
On Sun, May 22, 2016 at 01:51:05AM +, Davinder Singh wrote: > On Sun, May 22, 2016 at 2:09 AM Michael Niedermayer> wrote: > > > On Sat, May 21, 2016 at 02:21:17PM +, Davinder Singh wrote: > > > hi, > > > > > > this patch fixes following compiler warnings: > > > > > > libavcodec/cfhd.c:346:78: warning: format specifies type 'unsigned short' > > > but the argument has type 'int' [-Wformat] > > > av_log(avctx, AV_LOG_DEBUG, "Small chunk length %"PRIu16" > > > %s\n", data * 4, tag < 0 ? "optional" : "required"); > > > ~~ > > > ^~~~ > > > libavcodec/cfhd.c:472:110: warning: format specifies type 'unsigned > > short' > > > but the argument has type 'int' [-Wformat] > > > av_log(avctx, AV_LOG_DEBUG, "Start of lowpass coeffs > > component > > > %"PRIu16" height:%d, width:%d\n", s->channel_num, lowpass_height, > > > lowpass_width); > > > > > > ~~^~ > > > libavcodec/cfhd.c:490:77: warning: format specifies type 'unsigned short' > > > but the argument has type 'int' [-Wformat] > > > av_log(avctx, AV_LOG_DEBUG, "Lowpass coefficients > > %"PRIu16"\n", > > > lowpass_width * lowpass_height); > > > ~~ > > > ^~ > > > > > > > > > > > > libavcodec/dv_tablegen.c:30:60: warning: format specifies type 'char' but > > > the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat] > > >"{0x%"PRIx32", %"PRId8"}", data[i].vlc, data[i].size) > > > ~~~^~~~ > > > libavcodec/tableprint.h:37:29: note: expanded from macro > > > 'WRITE_1D_FUNC_ARGV' > > >printf(" "fmtstr",", __VA_ARGS__);\ > > > ^~~ > > > libavcodec/dv_tablegen.c:30:60: warning: format specifies type 'char' but > > > the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat] > > >"{0x%"PRIx32", %"PRId8"}", data[i].vlc, data[i].size) > > > ~~~^~~~ > > > > > > > > > > > > libavfilter/af_hdcd.c:896:57: warning: shifting a negative signed value > > is > > > undefined [-Wshift-negative-value] > > > state->readahead = readaheadtab[bits & ~(-1 << 8)]; > > > > > > > > > > > > libavfilter/vf_hwdownload.c:59:5: warning: ignoring return value of > > > function declared with warn_unused_result attribute [-Wunused-result] > > > ff_formats_ref(infmts, >inputs[0]->out_formats); > > > ^~ ~~~ > > > libavfilter/vf_hwdownload.c:60:5: warning: ignoring return value of > > > function declared with warn_unused_result attribute [-Wunused-result] > > > ff_formats_ref(outfmts, >outputs[0]->in_formats); > > > ^~ ~~~ > > > > > > > > > > > > libavutil/opencl.c:456:17: warning: variable 'kernel_source' is used > > > uninitialized whenever 'for' loop exits because its condition is false > > > [-Wsometimes-uninitialized] > > > for (i = 0; i < opencl_ctx.kernel_code_count; i++) { > > > ^~~~ > > > libavutil/opencl.c:466:10: note: uninitialized use occurs here > > > if (!kernel_source) { > > > ^ > > > libavutil/opencl.c:456:17: note: remove the condition if it is always > > true > > > for (i = 0; i < opencl_ctx.kernel_code_count; i++) { > > > ^~~~ > > > libavutil/opencl.c:448:30: note: initialize the variable 'kernel_source' > > to > > > silence this warning > > > const char *kernel_source; > > > ^ > > > = NULL > > > > > libavcodec/cfhd.c |6 +++--- > > > libavcodec/dv_tablegen.c|2 +- > > > libavfilter/af_hdcd.c |2 +- > > > libavfilter/vf_hwdownload.c |6 -- > > > libavutil/opencl.c |2 +- > > > > please split this patch > > the fixed warnings are unrelated to each other and possibly differnt > > developers would like to reply to different parts > > > > [...] > > > > -- > > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > > > I have often repented speaking, but never of holding my tongue. > > -- Xenocrates > > ___ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > [...] > opencl.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > b3b89a601cc0447677a9f0f375c20f1f63d66f42 > 0005-libavutil-opencl-fixed-uninitialized-var-warning.patch > From 9259a055b908c12c7ab7c5f08aae95f3cdaacfa8 Mon Sep 17 00:00:00 2001 > From: dsmudhar > Date: Sun, 22 May 2016 06:29:27 +0530 > Subject: [PATCH 5/7]
Re: [FFmpeg-devel] [PATCH] fix few compiler warnings
On Mon, May 23, 2016 at 03:06:35PM +0200, Hendrik Leppkes wrote: > On Mon, May 23, 2016 at 1:59 PM, Michael Niedermayer >wrote: > > On Mon, May 23, 2016 at 07:24:23AM -0400, Ronald S. Bultje wrote: > >> Hi, > >> > >> On Sun, May 22, 2016 at 11:39 PM, Michael Niedermayer < > >> mich...@niedermayer.cc> wrote: > >> > >> > On Sun, May 22, 2016 at 01:51:05AM +, Davinder Singh wrote: > >> > > On Sun, May 22, 2016 at 2:09 AM Michael Niedermayer > >> > > >> > > wrote: > >> > > > >> > > > On Sat, May 21, 2016 at 02:21:17PM +, Davinder Singh wrote: > >> > > > > hi, > >> > > > > > >> > > > > this patch fixes following compiler warnings: > >> > > > > > >> > > > > libavcodec/cfhd.c:346:78: warning: format specifies type 'unsigned > >> > short' > >> > > > > but the argument has type 'int' [-Wformat] > >> > > > > av_log(avctx, AV_LOG_DEBUG, "Small chunk length > >> > > > > %"PRIu16" > >> > > > > %s\n", data * 4, tag < 0 ? "optional" : "required"); > >> > > > > ~~ > >> > > > > ^~~~ > >> > > > > libavcodec/cfhd.c:472:110: warning: format specifies type 'unsigned > >> > > > short' > >> > > > > but the argument has type 'int' [-Wformat] > >> > > > > av_log(avctx, AV_LOG_DEBUG, "Start of lowpass coeffs > >> > > > component > >> > > > > %"PRIu16" height:%d, width:%d\n", s->channel_num, lowpass_height, > >> > > > > lowpass_width); > >> > > > > > >> > > > > ~~^~ > >> > > > > libavcodec/cfhd.c:490:77: warning: format specifies type 'unsigned > >> > short' > >> > > > > but the argument has type 'int' [-Wformat] > >> > > > > av_log(avctx, AV_LOG_DEBUG, "Lowpass coefficients > >> > > > %"PRIu16"\n", > >> > > > > lowpass_width * lowpass_height); > >> > > > > ~~ > >> > > > > ^~ > >> > > > > > >> > > > > > >> > > > > > >> > > > > libavcodec/dv_tablegen.c:30:60: warning: format specifies type > >> > 'char' but > >> > > > > the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat] > >> > > > >"{0x%"PRIx32", %"PRId8"}", data[i].vlc, > >> > data[i].size) > >> > > > > > >> > ~~~^~~~ > >> > > > > libavcodec/tableprint.h:37:29: note: expanded from macro > >> > > > > 'WRITE_1D_FUNC_ARGV' > >> > > > >printf(" "fmtstr",", __VA_ARGS__);\ > >> > > > > ^~~ > >> > > > > libavcodec/dv_tablegen.c:30:60: warning: format specifies type > >> > 'char' but > >> > > > > the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat] > >> > > > >"{0x%"PRIx32", %"PRId8"}", data[i].vlc, > >> > data[i].size) > >> > > > > > >> > ~~~^~~~ > >> > > > > > >> > > > > > >> > > > > > >> > > > > libavfilter/af_hdcd.c:896:57: warning: shifting a negative signed > >> > value > >> > > > is > >> > > > > undefined [-Wshift-negative-value] > >> > > > > state->readahead = readaheadtab[bits & ~(-1 << 8)]; > >> > > > > > >> > > > > > >> > > > > > >> > > > > libavfilter/vf_hwdownload.c:59:5: warning: ignoring return value of > >> > > > > function declared with warn_unused_result attribute > >> > > > > [-Wunused-result] > >> > > > > ff_formats_ref(infmts, >inputs[0]->out_formats); > >> > > > > ^~ ~~~ > >> > > > > libavfilter/vf_hwdownload.c:60:5: warning: ignoring return value of > >> > > > > function declared with warn_unused_result attribute > >> > > > > [-Wunused-result] > >> > > > > ff_formats_ref(outfmts, >outputs[0]->in_formats); > >> > > > > ^~ ~~~ > >> > > > > > >> > > > > > >> > > > > > >> > > > > libavutil/opencl.c:456:17: warning: variable 'kernel_source' is > >> > > > > used > >> > > > > uninitialized whenever 'for' loop exits because its condition is > >> > false > >> > > > > [-Wsometimes-uninitialized] > >> > > > > for (i = 0; i < opencl_ctx.kernel_code_count; i++) { > >> > > > > ^~~~ > >> > > > > libavutil/opencl.c:466:10: note: uninitialized use occurs here > >> > > > > if (!kernel_source) { > >> > > > > ^ > >> > > > > libavutil/opencl.c:456:17: note: remove the condition if it is > >> > > > > always > >> > > > true > >> > > > > for (i = 0; i < opencl_ctx.kernel_code_count; i++) { > >> > > > > ^~~~ > >> > > > > libavutil/opencl.c:448:30: note: initialize the variable > >> > 'kernel_source' > >> > > > to > >> > > > > silence this warning > >> > > > > const char *kernel_source; > >> > > > > ^ > >> > > > > = NULL > >> > > > > >> > > > >
Re: [FFmpeg-devel] [PATCH] fix few compiler warnings
On Mon, May 23, 2016 at 1:59 PM, Michael Niedermayerwrote: > On Mon, May 23, 2016 at 07:24:23AM -0400, Ronald S. Bultje wrote: >> Hi, >> >> On Sun, May 22, 2016 at 11:39 PM, Michael Niedermayer < >> mich...@niedermayer.cc> wrote: >> >> > On Sun, May 22, 2016 at 01:51:05AM +, Davinder Singh wrote: >> > > On Sun, May 22, 2016 at 2:09 AM Michael Niedermayer >> > >> > > wrote: >> > > >> > > > On Sat, May 21, 2016 at 02:21:17PM +, Davinder Singh wrote: >> > > > > hi, >> > > > > >> > > > > this patch fixes following compiler warnings: >> > > > > >> > > > > libavcodec/cfhd.c:346:78: warning: format specifies type 'unsigned >> > short' >> > > > > but the argument has type 'int' [-Wformat] >> > > > > av_log(avctx, AV_LOG_DEBUG, "Small chunk length %"PRIu16" >> > > > > %s\n", data * 4, tag < 0 ? "optional" : "required"); >> > > > > ~~ >> > > > > ^~~~ >> > > > > libavcodec/cfhd.c:472:110: warning: format specifies type 'unsigned >> > > > short' >> > > > > but the argument has type 'int' [-Wformat] >> > > > > av_log(avctx, AV_LOG_DEBUG, "Start of lowpass coeffs >> > > > component >> > > > > %"PRIu16" height:%d, width:%d\n", s->channel_num, lowpass_height, >> > > > > lowpass_width); >> > > > > >> > > > > ~~^~ >> > > > > libavcodec/cfhd.c:490:77: warning: format specifies type 'unsigned >> > short' >> > > > > but the argument has type 'int' [-Wformat] >> > > > > av_log(avctx, AV_LOG_DEBUG, "Lowpass coefficients >> > > > %"PRIu16"\n", >> > > > > lowpass_width * lowpass_height); >> > > > > ~~ >> > > > > ^~ >> > > > > >> > > > > >> > > > > >> > > > > libavcodec/dv_tablegen.c:30:60: warning: format specifies type >> > 'char' but >> > > > > the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat] >> > > > >"{0x%"PRIx32", %"PRId8"}", data[i].vlc, >> > data[i].size) >> > > > > >> > ~~~^~~~ >> > > > > libavcodec/tableprint.h:37:29: note: expanded from macro >> > > > > 'WRITE_1D_FUNC_ARGV' >> > > > >printf(" "fmtstr",", __VA_ARGS__);\ >> > > > > ^~~ >> > > > > libavcodec/dv_tablegen.c:30:60: warning: format specifies type >> > 'char' but >> > > > > the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat] >> > > > >"{0x%"PRIx32", %"PRId8"}", data[i].vlc, >> > data[i].size) >> > > > > >> > ~~~^~~~ >> > > > > >> > > > > >> > > > > >> > > > > libavfilter/af_hdcd.c:896:57: warning: shifting a negative signed >> > value >> > > > is >> > > > > undefined [-Wshift-negative-value] >> > > > > state->readahead = readaheadtab[bits & ~(-1 << 8)]; >> > > > > >> > > > > >> > > > > >> > > > > libavfilter/vf_hwdownload.c:59:5: warning: ignoring return value of >> > > > > function declared with warn_unused_result attribute [-Wunused-result] >> > > > > ff_formats_ref(infmts, >inputs[0]->out_formats); >> > > > > ^~ ~~~ >> > > > > libavfilter/vf_hwdownload.c:60:5: warning: ignoring return value of >> > > > > function declared with warn_unused_result attribute [-Wunused-result] >> > > > > ff_formats_ref(outfmts, >outputs[0]->in_formats); >> > > > > ^~ ~~~ >> > > > > >> > > > > >> > > > > >> > > > > libavutil/opencl.c:456:17: warning: variable 'kernel_source' is used >> > > > > uninitialized whenever 'for' loop exits because its condition is >> > false >> > > > > [-Wsometimes-uninitialized] >> > > > > for (i = 0; i < opencl_ctx.kernel_code_count; i++) { >> > > > > ^~~~ >> > > > > libavutil/opencl.c:466:10: note: uninitialized use occurs here >> > > > > if (!kernel_source) { >> > > > > ^ >> > > > > libavutil/opencl.c:456:17: note: remove the condition if it is always >> > > > true >> > > > > for (i = 0; i < opencl_ctx.kernel_code_count; i++) { >> > > > > ^~~~ >> > > > > libavutil/opencl.c:448:30: note: initialize the variable >> > 'kernel_source' >> > > > to >> > > > > silence this warning >> > > > > const char *kernel_source; >> > > > > ^ >> > > > > = NULL >> > > > >> > > > > libavcodec/cfhd.c |6 +++--- >> > > > > libavcodec/dv_tablegen.c|2 +- >> > > > > libavfilter/af_hdcd.c |2 +- >> > > > > libavfilter/vf_hwdownload.c |6 -- >> > > > > libavutil/opencl.c |2 +- >> > > > >> > > > please split this patch >> > > > the fixed warnings are unrelated to each other and possibly
Re: [FFmpeg-devel] [PATCH] fix few compiler warnings
On Mon, May 23, 2016 at 07:24:23AM -0400, Ronald S. Bultje wrote: > Hi, > > On Sun, May 22, 2016 at 11:39 PM, Michael Niedermayer < > mich...@niedermayer.cc> wrote: > > > On Sun, May 22, 2016 at 01:51:05AM +, Davinder Singh wrote: > > > On Sun, May 22, 2016 at 2:09 AM Michael Niedermayer > >> > > wrote: > > > > > > > On Sat, May 21, 2016 at 02:21:17PM +, Davinder Singh wrote: > > > > > hi, > > > > > > > > > > this patch fixes following compiler warnings: > > > > > > > > > > libavcodec/cfhd.c:346:78: warning: format specifies type 'unsigned > > short' > > > > > but the argument has type 'int' [-Wformat] > > > > > av_log(avctx, AV_LOG_DEBUG, "Small chunk length %"PRIu16" > > > > > %s\n", data * 4, tag < 0 ? "optional" : "required"); > > > > > ~~ > > > > > ^~~~ > > > > > libavcodec/cfhd.c:472:110: warning: format specifies type 'unsigned > > > > short' > > > > > but the argument has type 'int' [-Wformat] > > > > > av_log(avctx, AV_LOG_DEBUG, "Start of lowpass coeffs > > > > component > > > > > %"PRIu16" height:%d, width:%d\n", s->channel_num, lowpass_height, > > > > > lowpass_width); > > > > > > > > > > ~~^~ > > > > > libavcodec/cfhd.c:490:77: warning: format specifies type 'unsigned > > short' > > > > > but the argument has type 'int' [-Wformat] > > > > > av_log(avctx, AV_LOG_DEBUG, "Lowpass coefficients > > > > %"PRIu16"\n", > > > > > lowpass_width * lowpass_height); > > > > > ~~ > > > > > ^~ > > > > > > > > > > > > > > > > > > > > libavcodec/dv_tablegen.c:30:60: warning: format specifies type > > 'char' but > > > > > the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat] > > > > >"{0x%"PRIx32", %"PRId8"}", data[i].vlc, > > data[i].size) > > > > > > > ~~~^~~~ > > > > > libavcodec/tableprint.h:37:29: note: expanded from macro > > > > > 'WRITE_1D_FUNC_ARGV' > > > > >printf(" "fmtstr",", __VA_ARGS__);\ > > > > > ^~~ > > > > > libavcodec/dv_tablegen.c:30:60: warning: format specifies type > > 'char' but > > > > > the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat] > > > > >"{0x%"PRIx32", %"PRId8"}", data[i].vlc, > > data[i].size) > > > > > > > ~~~^~~~ > > > > > > > > > > > > > > > > > > > > libavfilter/af_hdcd.c:896:57: warning: shifting a negative signed > > value > > > > is > > > > > undefined [-Wshift-negative-value] > > > > > state->readahead = readaheadtab[bits & ~(-1 << 8)]; > > > > > > > > > > > > > > > > > > > > libavfilter/vf_hwdownload.c:59:5: warning: ignoring return value of > > > > > function declared with warn_unused_result attribute [-Wunused-result] > > > > > ff_formats_ref(infmts, >inputs[0]->out_formats); > > > > > ^~ ~~~ > > > > > libavfilter/vf_hwdownload.c:60:5: warning: ignoring return value of > > > > > function declared with warn_unused_result attribute [-Wunused-result] > > > > > ff_formats_ref(outfmts, >outputs[0]->in_formats); > > > > > ^~ ~~~ > > > > > > > > > > > > > > > > > > > > libavutil/opencl.c:456:17: warning: variable 'kernel_source' is used > > > > > uninitialized whenever 'for' loop exits because its condition is > > false > > > > > [-Wsometimes-uninitialized] > > > > > for (i = 0; i < opencl_ctx.kernel_code_count; i++) { > > > > > ^~~~ > > > > > libavutil/opencl.c:466:10: note: uninitialized use occurs here > > > > > if (!kernel_source) { > > > > > ^ > > > > > libavutil/opencl.c:456:17: note: remove the condition if it is always > > > > true > > > > > for (i = 0; i < opencl_ctx.kernel_code_count; i++) { > > > > > ^~~~ > > > > > libavutil/opencl.c:448:30: note: initialize the variable > > 'kernel_source' > > > > to > > > > > silence this warning > > > > > const char *kernel_source; > > > > > ^ > > > > > = NULL > > > > > > > > > libavcodec/cfhd.c |6 +++--- > > > > > libavcodec/dv_tablegen.c|2 +- > > > > > libavfilter/af_hdcd.c |2 +- > > > > > libavfilter/vf_hwdownload.c |6 -- > > > > > libavutil/opencl.c |2 +- > > > > > > > > please split this patch > > > > the fixed warnings are unrelated to each other and possibly differnt > > > > developers would like to reply to different parts > > > > > > > > [...] > > > > > > > > -- > > > > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > > > > > >
Re: [FFmpeg-devel] [PATCH] fix few compiler warnings
On Sun, May 22, 2016 at 01:51:05AM +, Davinder Singh wrote: [...] > opencl.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > b3b89a601cc0447677a9f0f375c20f1f63d66f42 > 0005-libavutil-opencl-fixed-uninitialized-var-warning.patch > From 9259a055b908c12c7ab7c5f08aae95f3cdaacfa8 Mon Sep 17 00:00:00 2001 > From: dsmudhar> Date: Sun, 22 May 2016 06:29:27 +0530 > Subject: [PATCH 5/7] libavutil/opencl: fixed uninitialized var warning > > --- > libavutil/opencl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavutil/opencl.c b/libavutil/opencl.c > index 08b5034..af35770 100644 > --- a/libavutil/opencl.c > +++ b/libavutil/opencl.c > @@ -445,7 +445,7 @@ cl_program av_opencl_compile(const char *program_name, > const char *build_opts) > int i; > cl_int status, build_status; > int kernel_code_idx = 0; > -const char *kernel_source; > +const char *kernel_source = NULL; applied thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Freedom in capitalist society always remains about the same as it was in ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] fix few compiler warnings
Hi, On Sun, May 22, 2016 at 11:39 PM, Michael Niedermayer < mich...@niedermayer.cc> wrote: > On Sun, May 22, 2016 at 01:51:05AM +, Davinder Singh wrote: > > On Sun, May 22, 2016 at 2:09 AM Michael Niedermayer >> > wrote: > > > > > On Sat, May 21, 2016 at 02:21:17PM +, Davinder Singh wrote: > > > > hi, > > > > > > > > this patch fixes following compiler warnings: > > > > > > > > libavcodec/cfhd.c:346:78: warning: format specifies type 'unsigned > short' > > > > but the argument has type 'int' [-Wformat] > > > > av_log(avctx, AV_LOG_DEBUG, "Small chunk length %"PRIu16" > > > > %s\n", data * 4, tag < 0 ? "optional" : "required"); > > > > ~~ > > > > ^~~~ > > > > libavcodec/cfhd.c:472:110: warning: format specifies type 'unsigned > > > short' > > > > but the argument has type 'int' [-Wformat] > > > > av_log(avctx, AV_LOG_DEBUG, "Start of lowpass coeffs > > > component > > > > %"PRIu16" height:%d, width:%d\n", s->channel_num, lowpass_height, > > > > lowpass_width); > > > > > > > > ~~^~ > > > > libavcodec/cfhd.c:490:77: warning: format specifies type 'unsigned > short' > > > > but the argument has type 'int' [-Wformat] > > > > av_log(avctx, AV_LOG_DEBUG, "Lowpass coefficients > > > %"PRIu16"\n", > > > > lowpass_width * lowpass_height); > > > > ~~ > > > > ^~ > > > > > > > > > > > > > > > > libavcodec/dv_tablegen.c:30:60: warning: format specifies type > 'char' but > > > > the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat] > > > >"{0x%"PRIx32", %"PRId8"}", data[i].vlc, > data[i].size) > > > > > ~~~^~~~ > > > > libavcodec/tableprint.h:37:29: note: expanded from macro > > > > 'WRITE_1D_FUNC_ARGV' > > > >printf(" "fmtstr",", __VA_ARGS__);\ > > > > ^~~ > > > > libavcodec/dv_tablegen.c:30:60: warning: format specifies type > 'char' but > > > > the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat] > > > >"{0x%"PRIx32", %"PRId8"}", data[i].vlc, > data[i].size) > > > > > ~~~^~~~ > > > > > > > > > > > > > > > > libavfilter/af_hdcd.c:896:57: warning: shifting a negative signed > value > > > is > > > > undefined [-Wshift-negative-value] > > > > state->readahead = readaheadtab[bits & ~(-1 << 8)]; > > > > > > > > > > > > > > > > libavfilter/vf_hwdownload.c:59:5: warning: ignoring return value of > > > > function declared with warn_unused_result attribute [-Wunused-result] > > > > ff_formats_ref(infmts, >inputs[0]->out_formats); > > > > ^~ ~~~ > > > > libavfilter/vf_hwdownload.c:60:5: warning: ignoring return value of > > > > function declared with warn_unused_result attribute [-Wunused-result] > > > > ff_formats_ref(outfmts, >outputs[0]->in_formats); > > > > ^~ ~~~ > > > > > > > > > > > > > > > > libavutil/opencl.c:456:17: warning: variable 'kernel_source' is used > > > > uninitialized whenever 'for' loop exits because its condition is > false > > > > [-Wsometimes-uninitialized] > > > > for (i = 0; i < opencl_ctx.kernel_code_count; i++) { > > > > ^~~~ > > > > libavutil/opencl.c:466:10: note: uninitialized use occurs here > > > > if (!kernel_source) { > > > > ^ > > > > libavutil/opencl.c:456:17: note: remove the condition if it is always > > > true > > > > for (i = 0; i < opencl_ctx.kernel_code_count; i++) { > > > > ^~~~ > > > > libavutil/opencl.c:448:30: note: initialize the variable > 'kernel_source' > > > to > > > > silence this warning > > > > const char *kernel_source; > > > > ^ > > > > = NULL > > > > > > > libavcodec/cfhd.c |6 +++--- > > > > libavcodec/dv_tablegen.c|2 +- > > > > libavfilter/af_hdcd.c |2 +- > > > > libavfilter/vf_hwdownload.c |6 -- > > > > libavutil/opencl.c |2 +- > > > > > > please split this patch > > > the fixed warnings are unrelated to each other and possibly differnt > > > developers would like to reply to different parts > > > > > > [...] > > > > > > -- > > > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > > > > > I have often repented speaking, but never of holding my tongue. > > > -- Xenocrates > > > ___ > > > ffmpeg-devel mailing list > > > ffmpeg-devel@ffmpeg.org > > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > > > af_hdcd.c |2 +- > > 1 file
Re: [FFmpeg-devel] [PATCH] fix few compiler warnings
On Sun, May 22, 2016 at 01:51:05AM +, Davinder Singh wrote: > On Sun, May 22, 2016 at 2:09 AM Michael Niedermayer> wrote: > > > On Sat, May 21, 2016 at 02:21:17PM +, Davinder Singh wrote: > > > hi, > > > > > > this patch fixes following compiler warnings: > > > > > > libavcodec/cfhd.c:346:78: warning: format specifies type 'unsigned short' > > > but the argument has type 'int' [-Wformat] > > > av_log(avctx, AV_LOG_DEBUG, "Small chunk length %"PRIu16" > > > %s\n", data * 4, tag < 0 ? "optional" : "required"); > > > ~~ > > > ^~~~ > > > libavcodec/cfhd.c:472:110: warning: format specifies type 'unsigned > > short' > > > but the argument has type 'int' [-Wformat] > > > av_log(avctx, AV_LOG_DEBUG, "Start of lowpass coeffs > > component > > > %"PRIu16" height:%d, width:%d\n", s->channel_num, lowpass_height, > > > lowpass_width); > > > > > > ~~^~ > > > libavcodec/cfhd.c:490:77: warning: format specifies type 'unsigned short' > > > but the argument has type 'int' [-Wformat] > > > av_log(avctx, AV_LOG_DEBUG, "Lowpass coefficients > > %"PRIu16"\n", > > > lowpass_width * lowpass_height); > > > ~~ > > > ^~ > > > > > > > > > > > > libavcodec/dv_tablegen.c:30:60: warning: format specifies type 'char' but > > > the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat] > > >"{0x%"PRIx32", %"PRId8"}", data[i].vlc, data[i].size) > > > ~~~^~~~ > > > libavcodec/tableprint.h:37:29: note: expanded from macro > > > 'WRITE_1D_FUNC_ARGV' > > >printf(" "fmtstr",", __VA_ARGS__);\ > > > ^~~ > > > libavcodec/dv_tablegen.c:30:60: warning: format specifies type 'char' but > > > the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat] > > >"{0x%"PRIx32", %"PRId8"}", data[i].vlc, data[i].size) > > > ~~~^~~~ > > > > > > > > > > > > libavfilter/af_hdcd.c:896:57: warning: shifting a negative signed value > > is > > > undefined [-Wshift-negative-value] > > > state->readahead = readaheadtab[bits & ~(-1 << 8)]; > > > > > > > > > > > > libavfilter/vf_hwdownload.c:59:5: warning: ignoring return value of > > > function declared with warn_unused_result attribute [-Wunused-result] > > > ff_formats_ref(infmts, >inputs[0]->out_formats); > > > ^~ ~~~ > > > libavfilter/vf_hwdownload.c:60:5: warning: ignoring return value of > > > function declared with warn_unused_result attribute [-Wunused-result] > > > ff_formats_ref(outfmts, >outputs[0]->in_formats); > > > ^~ ~~~ > > > > > > > > > > > > libavutil/opencl.c:456:17: warning: variable 'kernel_source' is used > > > uninitialized whenever 'for' loop exits because its condition is false > > > [-Wsometimes-uninitialized] > > > for (i = 0; i < opencl_ctx.kernel_code_count; i++) { > > > ^~~~ > > > libavutil/opencl.c:466:10: note: uninitialized use occurs here > > > if (!kernel_source) { > > > ^ > > > libavutil/opencl.c:456:17: note: remove the condition if it is always > > true > > > for (i = 0; i < opencl_ctx.kernel_code_count; i++) { > > > ^~~~ > > > libavutil/opencl.c:448:30: note: initialize the variable 'kernel_source' > > to > > > silence this warning > > > const char *kernel_source; > > > ^ > > > = NULL > > > > > libavcodec/cfhd.c |6 +++--- > > > libavcodec/dv_tablegen.c|2 +- > > > libavfilter/af_hdcd.c |2 +- > > > libavfilter/vf_hwdownload.c |6 -- > > > libavutil/opencl.c |2 +- > > > > please split this patch > > the fixed warnings are unrelated to each other and possibly differnt > > developers would like to reply to different parts > > > > [...] > > > > -- > > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > > > I have often repented speaking, but never of holding my tongue. > > -- Xenocrates > > ___ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > af_hdcd.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > 0ff76093ae99c1ef8ae87b70d8bf5b6ef92c43b9 > 0003-libavfilter-af_hdcd-fixed-negative-signed-value-shif.patch > From c498d1a86f3cdbed94cc8bc4a9af7c87af03b275 Mon Sep 17 00:00:00 2001 > From: dsmudhar > Date: Sun, 22 May 2016 06:18:58 +0530 > Subject: [PATCH 3/7]
Re: [FFmpeg-devel] [PATCH] fix few compiler warnings
On Sun, May 22, 2016 at 2:09 AM Michael Niedermayerwrote: > On Sat, May 21, 2016 at 02:21:17PM +, Davinder Singh wrote: > > hi, > > > > this patch fixes following compiler warnings: > > > > libavcodec/cfhd.c:346:78: warning: format specifies type 'unsigned short' > > but the argument has type 'int' [-Wformat] > > av_log(avctx, AV_LOG_DEBUG, "Small chunk length %"PRIu16" > > %s\n", data * 4, tag < 0 ? "optional" : "required"); > > ~~ > > ^~~~ > > libavcodec/cfhd.c:472:110: warning: format specifies type 'unsigned > short' > > but the argument has type 'int' [-Wformat] > > av_log(avctx, AV_LOG_DEBUG, "Start of lowpass coeffs > component > > %"PRIu16" height:%d, width:%d\n", s->channel_num, lowpass_height, > > lowpass_width); > > > > ~~^~ > > libavcodec/cfhd.c:490:77: warning: format specifies type 'unsigned short' > > but the argument has type 'int' [-Wformat] > > av_log(avctx, AV_LOG_DEBUG, "Lowpass coefficients > %"PRIu16"\n", > > lowpass_width * lowpass_height); > > ~~ > > ^~ > > > > > > > > libavcodec/dv_tablegen.c:30:60: warning: format specifies type 'char' but > > the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat] > >"{0x%"PRIx32", %"PRId8"}", data[i].vlc, data[i].size) > > ~~~^~~~ > > libavcodec/tableprint.h:37:29: note: expanded from macro > > 'WRITE_1D_FUNC_ARGV' > >printf(" "fmtstr",", __VA_ARGS__);\ > > ^~~ > > libavcodec/dv_tablegen.c:30:60: warning: format specifies type 'char' but > > the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat] > >"{0x%"PRIx32", %"PRId8"}", data[i].vlc, data[i].size) > > ~~~^~~~ > > > > > > > > libavfilter/af_hdcd.c:896:57: warning: shifting a negative signed value > is > > undefined [-Wshift-negative-value] > > state->readahead = readaheadtab[bits & ~(-1 << 8)]; > > > > > > > > libavfilter/vf_hwdownload.c:59:5: warning: ignoring return value of > > function declared with warn_unused_result attribute [-Wunused-result] > > ff_formats_ref(infmts, >inputs[0]->out_formats); > > ^~ ~~~ > > libavfilter/vf_hwdownload.c:60:5: warning: ignoring return value of > > function declared with warn_unused_result attribute [-Wunused-result] > > ff_formats_ref(outfmts, >outputs[0]->in_formats); > > ^~ ~~~ > > > > > > > > libavutil/opencl.c:456:17: warning: variable 'kernel_source' is used > > uninitialized whenever 'for' loop exits because its condition is false > > [-Wsometimes-uninitialized] > > for (i = 0; i < opencl_ctx.kernel_code_count; i++) { > > ^~~~ > > libavutil/opencl.c:466:10: note: uninitialized use occurs here > > if (!kernel_source) { > > ^ > > libavutil/opencl.c:456:17: note: remove the condition if it is always > true > > for (i = 0; i < opencl_ctx.kernel_code_count; i++) { > > ^~~~ > > libavutil/opencl.c:448:30: note: initialize the variable 'kernel_source' > to > > silence this warning > > const char *kernel_source; > > ^ > > = NULL > > > libavcodec/cfhd.c |6 +++--- > > libavcodec/dv_tablegen.c|2 +- > > libavfilter/af_hdcd.c |2 +- > > libavfilter/vf_hwdownload.c |6 -- > > libavutil/opencl.c |2 +- > > please split this patch > the fixed warnings are unrelated to each other and possibly differnt > developers would like to reply to different parts > > [...] > > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > I have often repented speaking, but never of holding my tongue. > -- Xenocrates > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > 0003-libavfilter-af_hdcd-fixed-negative-signed-value-shif.patch Description: Binary data 0005-libavutil-opencl-fixed-uninitialized-var-warning.patch Description: Binary data 0001-libavcodec-cfhd-fixed-wrong-printf-format.patch Description: Binary data 0004-libavfilter-vf_hwdownload-show-error-when-ff_formats.patch Description: Binary data 0002-libavcodec-dv_tablegen-fixed-wrong-printf-format.patch Description: Binary data 0006-libavcodec-pngenc-fixed-assignment-discards-qualifie.patch Description: Binary data 0007-libavcodec-tscc-fixed-assignment-discards-qualifier-.patch Description: Binary data
Re: [FFmpeg-devel] [PATCH] fix few compiler warnings
On Sat, May 21, 2016 at 02:21:17PM +, Davinder Singh wrote: > hi, > > this patch fixes following compiler warnings: > > libavcodec/cfhd.c:346:78: warning: format specifies type 'unsigned short' > but the argument has type 'int' [-Wformat] > av_log(avctx, AV_LOG_DEBUG, "Small chunk length %"PRIu16" > %s\n", data * 4, tag < 0 ? "optional" : "required"); > ~~ > ^~~~ > libavcodec/cfhd.c:472:110: warning: format specifies type 'unsigned short' > but the argument has type 'int' [-Wformat] > av_log(avctx, AV_LOG_DEBUG, "Start of lowpass coeffs component > %"PRIu16" height:%d, width:%d\n", s->channel_num, lowpass_height, > lowpass_width); > > ~~^~ > libavcodec/cfhd.c:490:77: warning: format specifies type 'unsigned short' > but the argument has type 'int' [-Wformat] > av_log(avctx, AV_LOG_DEBUG, "Lowpass coefficients %"PRIu16"\n", > lowpass_width * lowpass_height); > ~~ > ^~ > > > > libavcodec/dv_tablegen.c:30:60: warning: format specifies type 'char' but > the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat] >"{0x%"PRIx32", %"PRId8"}", data[i].vlc, data[i].size) > ~~~^~~~ > libavcodec/tableprint.h:37:29: note: expanded from macro > 'WRITE_1D_FUNC_ARGV' >printf(" "fmtstr",", __VA_ARGS__);\ > ^~~ > libavcodec/dv_tablegen.c:30:60: warning: format specifies type 'char' but > the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat] >"{0x%"PRIx32", %"PRId8"}", data[i].vlc, data[i].size) > ~~~^~~~ > > > > libavfilter/af_hdcd.c:896:57: warning: shifting a negative signed value is > undefined [-Wshift-negative-value] > state->readahead = readaheadtab[bits & ~(-1 << 8)]; > > > > libavfilter/vf_hwdownload.c:59:5: warning: ignoring return value of > function declared with warn_unused_result attribute [-Wunused-result] > ff_formats_ref(infmts, >inputs[0]->out_formats); > ^~ ~~~ > libavfilter/vf_hwdownload.c:60:5: warning: ignoring return value of > function declared with warn_unused_result attribute [-Wunused-result] > ff_formats_ref(outfmts, >outputs[0]->in_formats); > ^~ ~~~ > > > > libavutil/opencl.c:456:17: warning: variable 'kernel_source' is used > uninitialized whenever 'for' loop exits because its condition is false > [-Wsometimes-uninitialized] > for (i = 0; i < opencl_ctx.kernel_code_count; i++) { > ^~~~ > libavutil/opencl.c:466:10: note: uninitialized use occurs here > if (!kernel_source) { > ^ > libavutil/opencl.c:456:17: note: remove the condition if it is always true > for (i = 0; i < opencl_ctx.kernel_code_count; i++) { > ^~~~ > libavutil/opencl.c:448:30: note: initialize the variable 'kernel_source' to > silence this warning > const char *kernel_source; > ^ > = NULL > libavcodec/cfhd.c |6 +++--- > libavcodec/dv_tablegen.c|2 +- > libavfilter/af_hdcd.c |2 +- > libavfilter/vf_hwdownload.c |6 -- > libavutil/opencl.c |2 +- please split this patch the fixed warnings are unrelated to each other and possibly differnt developers would like to reply to different parts [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I have often repented speaking, but never of holding my tongue. -- Xenocrates signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] fix few compiler warnings
2 more: libavcodec/pngenc.c:274:25: warning: assigning to 'Bytef *' (aka 'unsigned char *') from 'const uint8_t *' (aka 'const unsigned char *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] s->zstream.next_in = data; ^ libavcodec/tscc.c:81:26: warning: assigning to 'Bytef *' (aka 'unsigned char *') from 'const uint8_t *' (aka 'const unsigned char *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] c->zstream.next_in = buf; ^ ~~~ 0001-fixed-assignment-discards-qualifier-warnings.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel